Bolsonaro was taken from the house where he is under house arrest to a hospital in Brazil's capital Brasília, according to several media outlets. According to his son, senator Flavio Bolsonaro, a persistent and severe hiccough had made the 70-year-old unable to breathe properly, which was followed by vomiting.
Late on Wednesday, a doctor at the hospital said that Bolsonaro had been diagnosed with skin cancer, with the diagnosis not being related to the symptoms for which he sought care.
Bolsonaro was able to leave the hospital on Wednesday.
The former president was, due to health reasons, not present during the final part of the trial against him, in which he was sentenced to more than 27 years in prison for attempting to stage a coup to retain power after the 2022 election.
He has denied all allegations and his representatives have announced that they will appeal the verdict.