The decision on Monday means that the four verdicts against Lula, as the former president is commonly called, on, among other things, corruption and bribery will be withdrawn.

The verdicts concern contacts with the Brazilian state oil company Petrobras.

In the surprising decision, Judge Edson Fachin believes that the trial must be repeated, as the court in the city of Curitiba where the case was tried lacked jurisdiction in the case.

Instead, the trial will be repeated in a federal court in the capital Brasília, says Fachin.

His decision will be reviewed by the entire Supreme Court.

A public prosecutor says the decision should be appealed.

Bolsonaro to attack

But President Bolsonaro, who is on the opposite side politically in relation to Lula, says he hopes a unified Supreme Court will overturn Judge Fachin's decision.

Bolsonaro also says he does not think the Brazilian people want a left-wing leader like Lula.

The two are arch-rivals, with a fairly large built-up hatred towards each other.

Lula has served 18 months in prison, and has not been allowed to stand for election due to the verdict.

The former trade union leader was president from 2003 to 2010, but was one of several convicted after an extensive anti-corruption operation called the car wash operation.

If the decision is firm that the trial must be redone, the 75-year-old Lula can run in the 2022 presidential election.