Brazil's Supreme Court ruled Tuesday that judge Sergio Moro was "biased" in convicting ex-president Luiz Inacio Lula da Silva of corruption in 2017, a new victory for the left-wing leader as he eyes a political comeback.
The 3-2 ruling by the court's second chamber came two weeks after one of the court's justices annulled Lula's corruption convictions on procedural grounds, clearing the way for him to mount a potential run against far-right President Jair Bolsonaro next year.
Lula, 75, led Brazil through an economic boom from 2003 to 2010, and remains one of its most popular politicians -- though his image was badly tarnished when he was sentenced to a total of 26 years on charges of taking bribes.
Recent opinion polls suggest the former steelworker and union leader is the best-placed politician to challenge Bolsonaro's re-election.
"Today's decision is another political victory for former president Lula, whose eligibility (to run in the October 2022 presidential elections) has been confirmed more strongly with each successive ruling by the Supreme Court," consulting firm Prospectiva said in a note.
The ruling can be appealed to the full 11-member Supreme Court, but legal analysts told AFP it was unlikely to be reversed.
The decision was the latest twist in a saga that has been packed with courtroom drama.
The chamber was headed for a 3-2 ruling against Lula, until Justice Carmen Lucia changed her vote at the last minute, reversing the outcome.
The cases against Lula grew out of "Operation Car Wash," a sweeping anti-corruption investigation that felled a Who's Who of top politicians and business executives accused of conspiring to embezzle billions of dollars from state oil company Petrobras.
Prosecutors struggled to pin evidence of direct involvement on Lula in court.
But they secured two convictions for taking bribes.
The first -- the only one delivered by Moro, and the subject of Tuesday's ruling -- was for allegedly accepting a triplex beach apartment from a Petrobras contractor.
Lula was jailed in April 2018 and spent more than 18 months in prison before being released pending appeal.
The former president denies wrongdoing in all the cases against him.
He claims he was the victim of a conspiracy to sideline him from the 2018 presidential election, in which he was the front-runner.
- Anti-corruption crusader's fall -
The ruling is a major blow for Moro, who spearheaded the Car Wash investigation.
Moro went on to accept the post of justice minister when Bolsonaro won the 2018 election amid the fallout of Car Wash -- a fact some of the justices cited in ruling him biased.
His image as an anti-corruption crusader has also been badly dented by hacked phone messages published by investigative news site The Intercept Brasil that appear to show he collaborated with prosecutors to ensure Lula was convicted.
Moro ultimately quit Bolsonaro's administration in April 2020, accusing the president of interference.
He has been cited as a possible presidential contender himself, but now faces mounting attacks on his legacy.
Lula meanwhile came out swinging at Bolsonaro after having his convictions annulled, attacking the president's "imbecile" handling of the coronavirus pandemic, which has left Brazil with the second-highest Covid-19 death toll in the world.
The former president has not said whether he plans to run in 2022, but his return has already shaken up the race.
Lula still faces four corruption cases stemming from Car Wash, including the one Moro convicted him for.
However, the latest rulings in his favor will force prosecutors to go back to the drawing board, meaning a new conviction "is highly unlikely before 2022," said Prospectiva.