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. But on Tuesday, Supreme Court Justice Alexandre de Moraes granted the request for an initial period of 90 days from the day of his discharge from hospital. Moraes said that after that period, Bolsonaro's situation would have to be reassessed. The judge, who also presided over the court case in which Bolsonaro was found guilty, also ordered that the former president wear an ankle monitor. After he was convicted in September, Bolsonaro spent some time under house arrest while his lawyers appealed against his sentence. However, in November, he was moved into a police cell after he tried to remove his ankle monitor with a soldering iron, blaming the incident on 'paranoia' induced by medication. The judge ruled at that time that Bolsonaro was a flight risk and ordered his arrest. In Tuesday's ruling, strict rules were laid down for Bolsonaro while serving his sentence at home, including prohibitions on using a phone or social media and limiting visits to family, lawyers, and medical personnel. Since being jailed, Jair Bolsonaro has backed his son Flávio as his preferred candidate for the upcoming presidential election in October.