As bells tolled and the clock struck 8, the brass-studded wooden doors swung shut Thursday at this palace in the Italian hills, marking an end to Benedict XVI's papacy and the start of his final journey as a "simple pilgrim."
Capping a day of tearful farewells that included an extraordinary pledge of obedience to his successor, Benedict entered history as the first pope in 600 years to resign — leaving the Catholic Church in unprecedented limbo and ending a pontificate shaped by struggles to move beyond clerical sex abuse scandals and reawaken Christianity in an indifferent world.
On Benedict's last day, the mood was vastly different inside the Vatican than at Castel Gandolfo, the 17th-century papal retreat set in the hills south of Rome, where he will spend the first two months of his retirement.
At the seat of the popes, Benedict's staff bade the pontiff goodbye in scenes of dignified solemnity, with Swiss Guards in full regalia and prelates kneeling to kiss his papal ring one last time.
A livelier atmosphere reigned in the countryside, with well-wishers jamming the hilltop town's main square, shouting "Viva il Papa!" and waving the yellow and white flags of the Holy See.
Cheers went up as the 85-year-old Benedict stepped out onto the palace balcony and, arms outstretched, declared his papacy was nearing the end.
"I am simply a pilgrim beginning the last leg of his pilgrimage on this Earth," he said. Then giving a final blessing, he declared: "Grazie e buona notte" — "Thank you and good night" in Italian.
It was a remarkable bookend to a papacy that began on April 19, 2005, with a similarly meek speech delivered from the loggia overlooking St. Peter's Square, where the newly elected Benedict said he was but a "simple humble worker in the vineyard of the Lord."
Over his eight-year papacy, Benedict tried to set the church on a more traditional course, convinced that all the ills afflicting it — sexual abuse, dwindling numbers of priests and empty pews — were a result of a misreading of the reforms of the Second Vatican Council.
His successor is likely to follow in his footsteps, given that the vast majority of the 115 cardinals who will elect the next pope were appointed by Benedict himself and share his conservative bent.
For the time being, the governance of the church shifts to Cardinal Tarcisio Bertone, the camerlengo, or chamberlain, who along with the College of Cardinals will guide the church and make plans starting Monday for the conclave to elect the 266th leader of the world's 1.2 billion Catholics.
One of Bertone's first acts was to lock the papal apartment inside the Vatican. In another task steeped in symbolism, he will ensure that Benedict's papal ring and seal are destroyed.
Benedict's journey into retirement began with a final audience with his cardinals, where he sought to defuse concerns about his future role and the possible conflicts arising from having both a reigning and a retired pope living side-by-side inside the Vatican.
"Among you is also the future pope, whom I today promise my unconditional reverence and obedience," Benedict told the cardinals.
Benedict's decision to live at the Vatican in retirement, wear the white cassock associated with the papacy and be called "emeritus pope" and "Your Holiness," rather than revert back to his birth name, Joseph Ratzinger, has deepened concerns about the shadow he might cast over the next pope.
Benedict has tried to address those worries, saying that he will be "hidden from the world" and live a life of prayer in retirement. On Thursday, he took a step further with his own public pledge to place himself entirely under the authority of the new pope.
Benedict also gave a final set of instructions to the princes of the church who will elect his successor, urging them to be united.
"May the College of Cardinals work like an orchestra, where diversity — an expression of the universal church — always works toward a higher and harmonious agreement," he said.
It seemed to be a clear reference to the deep internal divisions that have come to the fore in recent months following the leaks of sensitive documents that exposed power struggles and allegations of corruption inside the Vatican.
The audience inside the Apostolic Palace was as unique as Benedict's decision to quit. The pope, wearing his crimson velvet cape and using a cane, bade farewell to his closest advisers and the cardinals bowed to kiss his ring for the last time.
A few hours later, Benedict's closest aide, Monsignor Georg Gaenswein, wept by his side as they took their final walk down the marbled halls to the motorcade that took them to the helipad in the Vatican gardens.
As bells tolled in St. Peter's and in church towers across Rome, Benedict took off in a low-flying helicopter that circled St. Peter's Square, where banners reading "Thank You" were held skyward so he could see them, and then flew over the ruins of the ancient coliseum.
Benedict also reached out to the wider world electronically, sending a final tweet from his Twitter account, (at)Pontifex: "Thank you for your love and support. May you always experience the joy that comes from putting Christ at the centre of your lives."
Soon afterward, that tweet and all Benedict's previous ones were deleted and the profile was changed to read "Sede Vacante" — the See of Rome is vacant.
Then, as the clock struck 8 p.m., when Benedict's resignation took effect, two Swiss Guards standing at attention shut the thick wooden doors of Castel Gandolfo, symbolically closing out a papacy whose legacy will be most marked by the way it ended — a resignation instead of a death.
A Vatican official was then seen taking down the Holy See's white and yellow flag from the residence.
"We have the pope right here at home," said Anna Maria Togni, who walked two kilometers (one mile) from the outskirts of Castel Gandolfo to witness history. "We feel a tenderness toward him."
Benedict set his resignation in motion Feb. 11, when he announced that he no longer had the "strength of mind and body" do to the job. It was the first time that a pope had resigned since Pope Gregory XII stepped down in 1415 to help end a church schism.
In the weeks since Benedict's announcement, speculation has mounted whether other factors were to blame. By the time his final day came around, though, Benedict seemed perfectly serene with his decision.
The Vatican spokesman, the Rev. Federico Lombardi, said the pope's pledge to obey his successor was in keeping with his effort to "explain how he intends to live this unprecedented situation of an emeritus pope."
"He has no intention of interfering in the position or the decisions or the activity of his successor," Lombardi said. "But as every member of the church, he says fully that he recognizes the authority of the supreme pastor of the church who will be elected to succeed him."
The issue is important for Benedict. In his last legal document, he made new provisions for cardinals to make a formal, public pledge of obedience to the new pope at his installation Mass, in addition to the private one they traditionally make inside the Sistine Chapel immediately after he is elected.
The Rev. Thomas Reese, author of "Inside the Vatican," a guide to the Vatican bureaucracy, welcomed Benedict's own pledge, saying: "There is room in the church for only one pope, and his pledge of obedience shows that Benedict does not want to be used by anyone to undermine the authority of the new pope."
He said he would have preferred Benedict to go back to his given name and eschew the white robe of the papacy.
"Symbols are important in the church," he said.
Winfield reported from Vatican City.
Follow Nicole Winfield at www.twitter.com/nwinfield