A panel of Brazilian Supreme Court justices sentenced former president Jair Bolsonaro to 27 years and three months in prison Thursday after convicting him of attempting a coup to remain in office despite his 2022 electoral defeat.

Bolsonaro, who has always denied any wrongdoing, can try to appeal the ruling. He is currently under house arrest in Brasilia.

Four of the five justices reviewing the case in the panel found the far-right politician guilty on five counts, in a ruling that will deepen political divisions and was expected to prompt a backlash from the U.S. government. It makes Bolsonaro is the first former Brazilian president to be convicted of attempting a coup.

The five counts are: attempting a coup after losing the 2022 race to President Luiz Inácio Lula da Silva in a plot that prosecutors alleged included plans to kill Lula; participating in an armed criminal organization; attempted violent abolition of the democratic rule of law; damage qualified by violence; and deterioration of listed heritage.

Bolsonaro’s co-conspirators, all of them former Brazilian officials, were also sentenced for their roles in the attempted coup. Gen. Braga Netto, Bolsonaro’s former defense minister and running mate in 2022, received 26 years. Admiral Almir Garnier got 24 years. Gen. Augusto Heleno received 21 years and Gen. Paulo Sérgio Nogueira got 19 years. Lieutenant Colonel Mauro Cid, who cooperated with investigations, was given two years under an open regime.

Chief Justice Luís Roberto Barroso joined the panel at the end of the session and called the trial a “watershed moment in Brazil’s history.”

AP Video shot by Eduardo François and Luis Nova