A judge in Brazil has ruled that jailed former President Jair Bolsonaro can be placed under house arrest for the next three months because of poor health.

Bolsonaro, 71, was taken two weeks ago from his cell to a private clinic, where he was diagnosed with pneumonia and treated in an intensive care unit.

He has since been discharged from intensive care but his lawyers have argued that his recurrent health problems, many of which stem from a knife attack he suffered in 2018, warrant him being granted house arrest for humanitarian reasons.

Bolsonaro, who governed from January 2019 to December 2022, was sentenced to 27 years in jail for leading a conspiracy aimed at keeping him in power.

Previous requests by his lawyers to allow him to serve his sentence in the confines of his home were rejected.