The former president of Brazil, Jair Bolsonaro, has been sentenced to 27 years and three months in prison after being found guilty of plotting a military coup.

A panel of five Supreme Court justices handed down the sentence just hours after they had convicted the former leader.

They ruled he was guilty of leading a conspiracy aimed at keeping him in power after he lost the 2022 election to his left-wing rival, Luiz Inácio Lula da Silva.

Four of the justices found him guilty while one voted to acquit him. Bolsonaro's lawyers have called the sentence absurdly excessive and said that they would file the appropriate appeals.

The Supreme Court panel also barred him from running for public office until 2060 - eight years after the end of his sentence.

Bolsonaro, who was put under house arrest after being deemed a flight risk, did not attend this final phase of the trial in person. However, he has in the past claimed it was designed to prevent him from running in the 2026 presidential election - even though he had already been barred from public office on separate charges. He has also labeled the trials as a witch hunt.

His sentiments have been echoed by former US President Donald Trump, who framed Bolsonaro's prosecution as retaliation, stating, That's very much like they tried to do with me. But they didn't get away with it at all.

In response to the guilty verdict, US Secretary of State Marco Rubio condemned the ruling as unjust and threatened potential repercussions against what he described as a witch hunt.

Conversely, Brazil's foreign ministry reacted strongly, defending its judicial system and criticizing external threats as attempts to undermine its democracy.

Bolsonaro now confronts the stark possibility of spending the rest of his life in prison. His legal team is expected to argue for a reconsideration of his circumstances, suggesting he should remain under house arrest rather than be incarcerated, and appeal the conviction despite legal experts warning that achieving a favorable judgment may be challenging.

The Supreme Court found him guilty on five charges tied to his attempts to cling to power, which included discussions of coup proposals to military leaders and instigating doubt about the electoral system's integrity.

Moreover, the court indicated that Bolsonaro was aware of an assassination plan targeting Lula and other officials. Among the convicted co-conspirators are senior military officers and former defense ministers.

The failed coup attempt culminated in the January 8 storming of government buildings by Bolsonaro's supporters, a move the justices deemed as undermining Brazil's democratic principles.

Justice Alexandre de Moraes, overseeing the trial, emphasized that Brazil's democracy had been under grave threat, likening the coup attempt to a virus that jeopardizes societal stability.

The dissenting justice argued that Bolsonaro's accusations were unfounded; however, the majority insisted on the importance of safeguarding Brazil’s democratic order.

This article has been amended to clarify that Bolsonaro is barred from public office until 2060 - not 2033 as previously reported.