BRASILIA (Reuters) - Brazilian President Michel Temer on Thursday removed federal troops from the streets of the nation’s capital, a day after sending in the army to contain violent protests against his scandal-plagued government.

Army soldiers patrol the Agriculture Ministry in Brasilia, Brazil May 25, 2017. REUTERS/Paulo Whitaker

Temer’s decision to send armed soldiers to Brasilia on Wednesday provoked an outpouring of criticism in a country with raw memories of its 1964-1985 military dictatorship. And it gave the impression that Temer had lost control of the streets as he and his administration have been besieged by fresh corruption allegations.

“It was an unthinkable decision, totally out of proportion with the situation,” Congressman Alessandro Molon, of the opposition Sustainability Network party, told reporters Thursday in the capital. “It shows a fragile government whose days are numbered.”

The chaos has undermined Temer’s claim to be the best person to provide stability to Latin America’s largest nation. And it has weakened his political standing in Congress to the point where leaders of his party say that reforms needed to restore confidence and investment in a stalled economy could be delayed.

Defense Minister Raul Jungmann announced Thursday that Temer had revoked the decision to deploy the army, 17 hours after it was decreed. By midday, after his announcement, the troops were gone.

Hours earlier, soldiers carrying rifles guarded government ministries that had been stoned the day by protesters demanding Temer’s resignation and new elections. One building had been set on fire.

Jungmann said Brasilia police were overwhelmed by the tens of thousands of demonstrators who gathered to demand Temer’s resignation and an end to his unpopular labor and pension reforms.

Jungmann said the army was called in to stop the vandalism that began when demonstrators and police clashed on the grassy esplanade of the capital, where about 50 people were injured.

Wednesday’s protests were the most violent in Brasilia since anti-government demonstrations in 2013 and added fuel to a political crisis sparked by allegations that Temer condoned paying off a potential witness in a massive corruption probe.

Temer refused to resign last week after the Supreme Court opened an investigation into bribery allegations made in plea-bargain testimony by billionaire Joesley Batista. Batista is owner of meatpacking giant JBS SA and his allegations came from a conversation he secretly recorded with Temer.

In a recorded message released later on Thursday, Temer, 76, said the nation has not come to a standstill and that Congress continues to vote on government proposals.

The Brazilian Bar Association presented a request on Thursday for Congress to open impeachment proceedings against Temer for failing to take action after listening to Batista detail bribes of authorities.

Fifteen petitions to impeach Temer have been filed since last week, but it is up to Rodrigo Maia, speaker of Brazil’s lower house and a Temer ally, whether they would be put to a vote. Maia has vowed he will not allow it.

Pressure on Temer to leave office comes on the heels of the impeachment of leftist president Dilma Rousseff last year.

But Temer’s future is more likely to be decided by Brazil’s top electoral court, which could annul the 2014 election victory of the Rousseff-Temer ticket for campaigning with illegal funds when it meets in early June.

Even some of Temer’s allies see that as the quickest way to resolve Brazil’s crisis.