Brazil's Temer deploys army as protesters battle police

(Adds number of injured, Temer statement on troops, allied party standing with him for now, analyst sees more protests to come)

By Alonso Soto and Anthony Boadle

BRASILIA, May 24 (Reuters) - Protesters demanding the resignation of Brazilian President Michel Temer staged running battles with police and set fire to a ministry building in Brasilia on Wednesday, prompting the scandal-hit leader to order the army onto the streets.

Police unleashed volleys of tear gas, stun grenades and rubber bullets to halt tens of thousands of protesters as they marched towards Congress to call for Temer's ouster and an end to his austerity program.

Masked protesters fired powerful fireworks at police, set ablaze furniture in the Agriculture Ministry, and sprayed anti-Temer graffiti on government buildings.

It was the most violent protest in Brasilia since anti-government demonstrations in 2013 and fueled a political crisis sparked by allegations Temer condoned paying off a potential witness in a massive corruption probe.

The scandal has raised chances Brazil could see a second president fall in less than a year.

Police cordons held back protesters from advancing on the modernistic Congress building where the main ally in Temer's coalition, the PSDB party, met to discuss whether to continue backing him and prepare for a post-Temer transition.

One protestor was shot and wounded, police said. Local media reported at least one other demonstrator was seriously injured by a rubber bullet to the face, while another lost part of his hand while trying to throw an explosive device at officers. The city government said 49 people were hurt.

Temer approved a decree allowing army troops to assist police in restoring order in Brasilia for the next week, giving soldiers policing powers and the right to make arrests. His office said Temer turned to the military after police were overwhelmed.

The move brought immediate criticism in a nation where memories of a brutal 1964-85 military dictatorship remain fresh.

"What are they going to do? Intervene and wage war against the people that are out there on the esplanade?" Senator Gleisi Hoffmann of the opposition Workers' Party said on the Senate floor.

"TEMER IS NO LONGER GOVERNING"

Temer, a former vice president whose government's approval rating is in the single digits, took office a year ago after former President Dilma Rousseff was impeached for breaking budgetary laws.

Rousseff and her supporters labeled that a "coup" orchestrated by Temer and his allies in an effort to halt a sweeping, three-year corruption probe that has placed scores of sitting politicians under investigation.