Pope Francis appeared at his window of the Gemelli hospital in Rome and offered a blessing for the first time since being admitted on 14 February.
The 88-year-old pontiff was discharged minutes later, and doctors said he would need at least two months of rest at the Vatican.
During the past five weeks, he presented “two very critical episodes” where his “life was in danger”, Dr Sergio Alfieri, one of the doctors treating the Pope, said.
Dr Alfieri said Pope Francis was never intubated and remained alert and oriented. Even though the Pope is not completely healed, he no longer has pneumonia and will return to work as soon as possible if the trend continues.
Mayor of Rome Roberto Gualtieri told the BBC he felt “a really great joy, great emotion to see Pope Francis leaving the hospital”.
“It’s a great gift to the city and the world… we support him and feel close to him,” the mayor said.
“When I saw him I felt, to be honest, a little relieved,” said Bishop Larry Kulick, from the Diocese of Greensburg in the US state of Pennsylvania. “I felt just overjoyed to see him.”
“I cried all the time because the love we breathe in this little square of this hospital was like heaven,” said Ilaria Della Bidia, a singer from Rome.
Ana Matos from Brazil said she “just arrived from Brazil today” and arrived outside the hospital “30 seconds before he appeared”. She said, “It was an amazing feeling, like when I had my son. I was so happy to see him healthy, and I could see him smile”.
Since his admission to the hospital, the Pope had only been seen by the public once: in a photograph released by the Vatican last week, which showed him praying in a hospital chapel.
Earlier this month, an audio recording of Pope Francis was played in St Peter’s Square in Vatican City.
Pope Francis, who has led the Roman Catholic Church for 12 years, spoke breathlessly as he thanked the faithful for their prayers.
He has suffered a number of health issues throughout his life, including having part of one of his lungs removed at age 21, making him more prone to infections.
We’ve got the edge. Get real-time reports, breaking scoops, and exclusive angles delivered straight to your phone. Don’t settle for stale news. Join LEADERSHIP NEWS on WhatsApp for 24/7 updates →
Join Our WhatsApp Channel