Brazil's top electoral court dismissed a case on Friday that threatened to unseat president Michel Temer for alleged illegal campaign funding in the 2014 election, when he was the running mate of impeached president Dilma Rousseff.
The ruling gives Mr Temer some breathing room but will not end a political crisis enveloping the beleaguered centre-right leader. He is being investigated separately by federal prosecutors for corruption, obstruction of justice and racketeering.
"We cannot be changing the president of the republic all the time, even if the people want to," said the court's chief judge, Gilmar Mendes.
Mr Mendes, who backed the impeachment of Ms Rousseff, said the country should not expect the court to solve the current political crisis.
The electoral court, known as the TSE, voted 4-3 to acquit the Rousseff-Temer ticket of wrongdoing. That avoided the annulment of their election and the removal of Mr Temer from office. He took over a year ago following Ms Rousseff’s impeachment in the midst of Brazil’s worst recession on record.
In a decisive move, that same majority had ruled on Thursday to not allow as evidence in the case plea-bargain testimony from 77 executives of the Odebrecht construction firm, which is at the centre of a vast political graft scheme.
Those witnesses told investigators they funnelled millions of dollars in illegal funds into the 2014 Rousseff-Temer ticket. But the testimony was made more than a year after the beginning of the case that concluded Friday, and without it Mr Temer’s lawyers argued there was no proof of wrongdoing.
The acquittal will help Mr Temer, whose government’s poll ratings are in the single digits, retain key coalition allies who will support approval in congress of his fiscal reform agenda. The austerity measures aim to bring a gaping budget deficit under control and restore investor confidence.
Alexandre Parola, a spokesman for Mr Temer, said after the ruling that the president viewed the decision as an example of effective institutions keeping the country's democracy working.
Political analysts said the acquittal was disastrous for the credibility of Brazil’s judiciary, the government institution that polls show is most trusted by Brazilians. Some warned it would add to growing disillusionment with democracy.
"This catastrophic ruling prolongs the survival of a government that has lost all credibility and can no longer govern," said Roberto Romano, professor of ethics and political philosophy at Campinas university. He said it would add to a small but worrying trend of Brazilians favouring a return to military rule.
Mr Temer, a third of his cabinet and dozens of powerful congressmen are under investigation for corruption.
The leader is likely to soon face separate charges in the case involving allegations of receiving bribes and condoning the payment of hush money handed over to a potential witness in a massive graft scandal, investigators have told Reuters.
The supreme court approved the investigation into the president late last month.
But to put him on trial, the charges against the president would have to be approved by two-thirds of the lower chamber of congress, where Mr Temer’s coalition retains a majority.
With an election year approaching in 2018, however, the governing coalition’s majority could shrink if politicians break away, concerned about voters punishing them for being part of a government overwhelmingly perceived in polls as corrupt.
Acquittal by the electoral court could help Mr Temer's main coalition ally, the Brazilian Social Democracy Party (PSDB), convince its younger members who want to leave the government to stay put and help push unpopular reforms through congress.
But political volatility will not die down.
"The days ahead will be very difficult for Temer. The corruption investigations are just starting," said Flavia Bahia, professor at the CERS law school and FGV think tank in Rio de Janeiro. "The government can't be sure of its allies anymore."
The separate investigation by prosecutors into Mr Temer includes a secret recording of a conversation he had earlier this year with a former top executive of meatpacker JBS SA .
In it, the president appears to condone paying bribes to an imprisoned former politician to keep him from turning state’s witness and providing potentially devastating testimony about graft.
Mr Temer has denied any wrongdoing and insists he will never resign.