Brazilian former President Jair Bolsonaro on Sunday briefly left his home in Brasilia where he is under house arrest to undergo a medical procedure at a nearby hospital, his first public appearance since he was handed a 27-year-long prison sentence.

On Thursday, a panel of Supreme Court justices ruled that Bolsonaro had attempted a coup and tried to illegally hang onto power despite his 2022 electoral defeat to current President Luiz Inácio Lula da Silva.

Escorted by police, Bolsonaro went to the DF Star hospital in Brazil's capital for procedures related to skin lesions — a temporary release granted by Justice Alexandre de Moraes on Sept. 8.

He was discharged in the afternoon, doctors from the hospital said in a statement.

Medical staff removed eight skin lesions that will be sent for analysis to establish a definitive diagnosis and assess the need for further treatment.

After the medical visit, Bolsonaro must file a certificate of attendance, indicating the date and times of the appointments, to the Supreme Court.

Die-hard supporters of Bolsonaro awaited the ex-president when he arrived at the hospital on Sunday and greeted him with shouts of “Amnesty now!”

The chant is in reference to the push of Bolsonaro’s allies in Congress to grant the former president some kind of amnesty.

“We’re here to provide spiritual and psychological support,” said Deusélis Filho, 46, the president of a group of Bolsonaro supporters called Influencers of Brazil.

Thursday's sentence doesn’t mean that Bolsonaro will immediately go to prison. The court panel now has up to 60 days to publish the ruling.

Once it does, Bolsonaro’s lawyers have five days to file motions for clarification.

His lawyers have said that they will try to appeal both the conviction and sentence before the full Supreme Court of 11 justices, although some experts think it’s unlikely to be accepted.

International interest in Bolsonaro’s trial increased after U.S. President Donald Trump imposed a 50% tariff on Brazil, citing what he called a “witch hunt” against Bolsonaro.

AP video by Eduardo François.