Brazilian President Michel Temer hoped Thursday to turn a surprisingly easy victory in blocking his corruption trial into momentum for austerity reforms, but more turmoil could await the unpopular leader.
Temer needed a third of the lower house of Congress' support to avoid being suspended from office and put on trial in the Supreme Court.
After hours of angry, often raucous debates he got 263 votes -- more than half of the chamber. Another 21 deputies were either absent or abstained, deepening the defeat for anti-corruption prosecutors.
Accused of agreeing to take millions of dollars in bribes, Temer was the first Brazilian president to face a criminal charge while in office.
Revelations from the "Car Wash" anti-graft operation -- which has recently targeted Temer, eight of his ministers, a third of lower house lawmakers and many other senior politicians -- have prompted disgust among Brazilians.
But Temer portrayed the "clear, indisputable" rejection of his trial as amounting to a fresh mandate.
Ever since coming to power a year ago following the impeachment of leftist president Dilma Rousseff, the center-right Temer has pursued austerity reforms which he says will revive Brazil after two years of deep recession.
The reforms are opposed by many ordinary Brazilians, but welcomed by the business community, which has seen Brazil fall from emerging market poster child to regional basket case.
Now Temer says he has new wind in his sails.
"We are pulling Brazil out of its worst economic crisis in our history," Temer said after the vote. "I want to complete the biggest transformation ever done in our country."
"The markets will be happy," said Gesner Oliveira, at the Go Associados consultancy. "It suggests that continuing the reform agenda is possible."
However, the public shows no sign of accepting the reforms, which include cuts to the generous pension system, while Temer's approval rating is just five percent.
That raises the possibility of more violent street protests. Several previous demonstrations have turned into riots where protesters set fire to a government building in Brasilia and torched buses and smashed bank windows in Rio de Janeiro.
On the other hand, well-off Brazilians who were instrumental in bringing down Rousseff during mass protests 12 months ago have largely stayed away from the anti-austerity and anti-corruption demonstrations.
The other challenge facing Temer is the likelihood of new charges by Prosecutor General Rodrigo Janot within the next few weeks.
Janot says he has damning evidence that Temer tried to obstruct justice by authorizing payment of hush money to Eduardo Cunha, a former senior legislator who is now in prison for corruption.
Oliveira said the scale of Wednesday's rejection by Congress of the bribery charge made it less likely that Janot will successfully be able to push new charges. "If the victory had been very slim or there had been demonstrations, then there would have been more political space for new charges."
But Paulo Teixeira, a deputy from the opposition Workers' Party, said Temer "only won the first round."
"The second round is the upcoming charges for obstruction of justice to be presented by prosecutors," he said. "I don’t think the government will be strong enough to deal with these new charges. They already used up their ammunition."
With no backing from voters, Temer and his reforms will now depend entirely on the continued support of Congress. For now, lawmakers have saved him but as action heats up ahead of elections in October 2018 the legislature's notoriously fluid alliances could change again.