Pope Benedict XVI bid an emotional farewell to 150,000 pilgrims before his departure as the leader of the Catholic Church.
The outgoing Pontiff, whose resignation will mean the position will become formally vacant for the first time in more than 600 years tonight, spoke of the "rough seas" that marked his papacy.
In an unusually public outpouring, he alluded to some of the most difficult times of his papacy, which was dogged by sex abuse scandals, leaks of his private papers and reports of infighting among his aides.
"Thank you, I am very moved," Benedict told a cheering crowd in St Peter's Square in Rome. He said he had great trust in the Church's future, that his abdication was for the good of the Church and asked for prayers for cardinals choosing his successor.
His final address was repeatedly interrupted by applause and cries of "Benedict, Benedict".
"There were moments of joy and light but also moments that were not easy - when the seas were rough - and it seemed that the Lord was sleeping," he said.
The crowd stood to applaud after he had finished.
"I took this step in the full knowledge of its gravity and rarity but with a profound serenity of spirit," he said, as people in the crowd waved supportive banners and national flags.
Loving the Church meant, "having the courage to take difficult and anguished choices, always having in mind the good of the Church and not oneself", he said.
The Pope says he is too old and weak to continue leading a Church beset by crises over child abuse by priests and a leak of confidential Vatican documents showing corruption and rivalry among Vatican officials.
He said he would serve the Church through prayer. Some critics have pointed to the late Pope John Paul II, who said he would "not come down from the cross" despite his bad health as he believed his suffering could inspire.
Most in the square were supportive of Benedict, an increasingly frail figure. "He did what he had to do in his conscience before God," said Sister Carmel, from a city north of Rome
However, some welcomed his resignation. "He was a disaster. It's good for everyone he resigned," said Peter McNamara, 61, an Australian who said he had come to the square "to witness history".
Pope Benedict also spoke of his gratitude for the welcome he received in Britain, which included a trip to Scotland.