Former Brazilian President Jair Bolsonaro will not be allowed to run for office again until 2030. 

Electoral judges voted on Friday to ban the former leader from public leadership for eight years. 

The court determined that Bolsonaro attacked public confidence in the country's democratic institutions and deemed the former leader a threat to political tensions.

The decision was made with four out of seven votes by the Superior Electoral Court.

BRAZIL'S FEDERAL POLICE SEARCH HOME OF FORMER PRESIDENT BOLSONARO OVER ALLEGED DOCTORED VACCINE CARDS

Jair Bolsonaro

Former Brazilian President Jair Bolsonaro leaves after giving testimony over the Jan. 8 attacks on government buildings, at Federal Police headquarters in Brasilia, Brazil. Thousands of Bolsonaro supporters trashed the presidential palace, the Supreme Court and Congress one week into President Luiz Inácio Lula da Silva's third term in office. At left is a police agent. (AP Photo/Gustavo Morteno)

One justice voted against the ban, while two more due to cast their vote later; however, the two awaited decisions cannot impact the outcome. 

FORMER BRAZILIAN PRESIDENT JAIR BOLSONARO GIVES TESTIMONY ABOUT HIS ACTIONS RELATED TO THE JAN. 8 ATTACKS

Army

Brazilian army soldiers take measures as they dismantle camps installed by supporters of former President Jair Messias Bolsonaro, outside the Eastern Military Command, central area of Rio de Janeiro on Jan. 9, 2023. ( Fabio Teixeira/Anadolu Agency via Getty Images)

Bolsonaro, who lost his election against left-wing opponent Luiz Inácio Lula da Silva in 2022, launched an aggressive campaign against the Brazilian government that claimed the election was stolen.

One week after Lula took office, Bolsonaro's supporters raided and trashed the buildings of the Supreme Court, Congress and the presidential palace. Hundreds of them are expected to stand trial.

BRAZIL’S NATIONAL CONGRESS, OTHER SITES RAIDED BY PRO-BOLSONARO PROTESTERS OPPOSING LULA VICTORY

Protest

Members of social movements protest in defense of democracy in Sao Paulo, Brazil, on Jan. 9, 2023, one day after supporters of Brazil's far-right ex-president Jair Bolsonaro invaded the Congress, presidential palace, and Supreme Court in Brasilia. (NELSON ALMEIDA/AFP via Getty Images)

Brazil's prosecutor-general, Augusto Aras, said earlier this month that Bolsonaro "allegedly encouraged the perpetration of crimes" against the rule of law. 

The former president left the country after his defeat and was staying in Orlando, Florida, during the attacks and has denied any involvement in them.

The ruling quashes Bolsanro's plans to re-enter national politics. The former president previously told media outlets he was considering a run for the Brazilian senate in 2026.

Brazil's President Luiz Inacio Lula da Silva

Brazil's President Luiz Inacio Lula da Silva attends a military promotion ceremony in Brasilia, Brazil. (AP Photo/Eraldo Peres, File)

CLICK HERE TO GET THE FOX NEWS APP

Bolsonaro has denied any wrongdoing in all cases.

The Associated Press contributed to this report.