Pope Francis on Wednesday left the Rome hospital where the head of the world's 1.2 billion Catholics had undergone an operation on his colon on July 4.
The 84-year old was whisked away from the Gemelli University Hospital in a car with tinted windows and was later spotted returning to his home within the Vatican's walls.
He stopped off on the way at the Basilica of Santa Maria Maggiore for a quick prayer to "express his gratitude for the success of his surgery," Vatican spokesman Matteo Bruni said in a statement.
The Argentine pontiff also prayed at the central Rome church for "all the sick, especially all those he had met during his stay in hospital," Bruni said.
Francis had been admitted to hospital after suffering from a type of diverticulitis, an inflammation of pockets that develop in the lining of the intestine.
The Vatican initially said he would be in hospital for about a week, and the pope led the Angelus prayer from his hospital window on Sunday.
On Monday, Vatican spokesman Matteo Bruni said he would stay for a "few more days."
It was not immediately clear whether Francis's schedule would immediately return to normal.
The pope managed to do some work from hospital, and retained all his powers as pontiff while away.
A special chamberlain, known as "the cardinal camerlengo," stood ready to take over in the event of death, as he does at all times, according to the Catholic News Service.
As if to ward off questions about his stamina, the Vatican announced on the day Francis was admitted to hospital that he would travel to Hungary and Slovakia later this year.
He also hopes to attend the COP26 climate conference in Glasgow in November, according to Scotland's bishops, and there is a reported trip to Greece also being planned.
The pontiff, who suffers from sciatica, confessed however after a trip to Iraq earlier this year that travelling made him "a lot more tired" these days.
His chronic nerve condition, which he has dubbed "a troublesome guest", causes, back, hip and leg pain and has occasionally forced him to cancel official events.
Francis almost died when he was 21 after developing pleurisy – an inflammation of the tissues that surround the lung – according to biographer Austen Ivereigh.
He had part of one of his lungs removed in October 1957.
He has also previously sought support for anxiety, according to journalist and doctor, Nelson Castro, but deals with it nowadays by listening to Bach or sipping mate.
The pope's abilities to manage stress may be tested later this month when 10 people – including a cardinal – go on trial at the Vatican for charges including embezzlement.
Cardinal Angelo Becciu was not only a high-ranking prelate but was one of Francis's close aides before he was fired last year and stripped of his cardinal rights.
Although Francis's predecessor, ex-pope Benedict XVI, officially stepped down due to his advancing age, many speculated whether stress may have played a part, his resignation coming on the back of the so-called 'Vatileaks' scandal.