Brazil's former president Jose Sarney was released from hospital Wednesday after a three-week stay.
The 83-year-old senator had been admitted to Sao Paulo's Sirio-Libanes hospital on July 31 for treatment of pneumonia, lung bleeding and dengue fever.
"His health is good and the senator will remain under outpatient observation," the hospital said in a medical bulletin.
Sarney, a politician and writer from the northeastern state of Maranhao, was Brazil's first civilian president after the 1964-1985 military dictatorship.
He is a member of the centrist Brazilian Democratic Movement Party.
He ran as a vice presidential candidate along with Tancredo Neves, who was elected president but died before he was sworn into office.
Sarney took over the top job in his place, serving from March 1985 to March 1990.