Brazilian Supreme Court on Monday overturned corruption convictions against former president Luiz Inacio Lula da Silva, clearing the way for the left-wing leader to run in the 2022 presidential election.

Justice Edson Fachin overturned all four convictions against the popular-but-tarnished ex-president (2003-2010) stemming from a probe into a massive corruption scheme centered on Brazilian state oil company Petrobras.

Fachin ruled that the court in Curitiba which convicted Lula “lacked jurisdiction,” and sent the cases to a federal court in the capital, Brasilia.

Lula, 75, regains the right to run for office unless the convictions are reinstated.

The cases stem from Operation Car Wash, a sprawling anti-corruption investigation that brought down a Who’s Who of powerful politicians and business executives in Brazil, jailed for using inflated construction contracts to systematically fleece Petrobras for billions of dollars.

Also read: ‘Never identified as boys’: Trans twins in Brazil undergo gender confirmation surgery together

Lula, who spent more than 18 months in jail before being freed in 2019 pending appeal, was the most powerful figure felled.

The court in Curitiba, where the probe was based, convicted Lula of using the corruption scheme to take bribes, remodel a triplex beach apartment and channel illegal funds to his foundation.

The convictions badly tarnished his image.

But the former metal worker remains a hero on the left, which sees the cases against him as a conspiracy that culminated in the rise of current President Jair Bolsonaro.

An Ipec opinion poll published Sunday gave Lula more potential votes in the October 2022 presidential elections than Bolsonaro — the only politician to outperform the far-right president.

But Lula remains highly controversial — so much so that the Sao Paulo stock exchange plunged by more than 1.5 percentage point when news of the court decision broke.

The former president’s press office said he had no immediate comment on the ruling.

“Lula innocent,” his Workers’ Party (PT) wrote on Twitter.