The jailed ex-president of Brazil, Jair Bolsonaro, has undergone a successful surgery for a double hernia, his wife Michelle says.

The former leader is serving a 27-year sentence for plotting a coup after he lost the 2022 presidential election to his left-wing rival, Luiz Inácio Lula da Silva.

Brazil's Supreme Court granted permission for the 70-year-old to be transferred from the room in the federal police headquarters where he is serving his sentence to a hospital in the capital, Brasília, for the procedure.

Ahead of the surgery, Jair Bolsonaro endorsed the candidacy of his eldest son, Flávio, for the 2026 presidential race.

The former president made his decision known in a handwritten letter that was read out by Flávio Bolsonaro outside the hospital where his father is being treated.

In the letter, Bolsonaro expressed his commitment to Brazil, stating, I hand over what is most important in the life of a father - my own son for the mission of rescuing our country, Brazil.

Flávio Bolsonaro, a 44-year-old senator, has already announced his intention to run for president on behalf of his father's Liberal Party.

Despite his incarceration, Jair Bolsonaro continues to hold considerable political influence, as evidenced by recent congressional actions aimed at reducing his sentence, which President Lula has indicated he would veto.

The former president is expected to be returned to federal police headquarters once he is medically cleared.