By Ben Brumfield and Ben Wedeman, CNN
VATICAN CITY (CNN) -- Pope Benedict XVI delivered his final public prayer ceremony Sunday to a crowd of thousands at St. Peter's Square in Vatican City.
And he explained his decision to step down.
"Thank you for your affection," the pope told the crowd as he appeared at the window of his apartment overlooking the square.
As is customary, he opened the weekly Angelus prayer with a short sermon.
Benedict spoke on the Transfiguration of Christ, one of the key moments in Jesus' life on Earth, when, according to the church, he took three disciples to pray on a mountain. During his prayers, Jesus was miraculously changed and filled with light.
The crowd interrupted Benedict with rousing applause, as he told them that God wanted him to do the same.
"The Lord is calling me to go on top of the hill, to dedicate myself once more to prayer and meditation," he said. "But this does not mean to abandon the church."
Resignation and rumors
This month, Benedict shocked the world with the announcement that he would step down. Thursday is his last day as acting pope.
The Italian media has been abuzz in recent days with allegations that gay clergy may have made themselves vulnerable to blackmail by male prostitutes, setting off speculation that a brewing scandal may have triggered Benedict's resignation.
The Vatican vehemently denied the allegations Saturday.
Vatican Secretary of State Tarcisio Bertone said it was "deplorable" that as the time for the Roman Catholic cardinals to elect a new pope approaches, a rash of "often unverified, unverifiable or completely false news stories" has appeared.
As the first pontiff to step down in six centuries, Benedict said he is resigning "because of advanced age." He is 85.
"Strength of mind and body are necessary, strength which in the last few months has deteriorated in me to the extent that I have had to recognize my incapacity to adequately fulfill the ministry entrusted to me," Benedict said when he announced his retirement this month.
Shortly after the pope's announcement nearly two weeks ago, a different rumor began making its way through the Italian media: Allegations that the pontiff's decision was linked to a medical procedure to replace the battery in his pacemaker. A Vatican spokesman dismissed the idea at the time.
CNN Senior Vatican Analyst John Allen has said that clergy members trying to cover up their sex lives may well be creating problems in the Catholic Church, as they have in the past. But he believes that the current unsourced speculation in the Italian media should be taken with a grain of salt.
Several years ago, Benedict suggested he would be open to resigning should his health fail, Allen has said.
Wrapping up a papacy
After the sermon, he chanted the Angelus, a common Catholic prayer, with the crowd.
It begins with: "The angel of the Lord declared unto Mary. And she conceived by the power of Holy Spirit. Hail Mary, full of grace, the Lord is with you. Blessed are you among women, and blessed is the fruit of your womb, Jesus."
The throng of spectators extended beyond the borders of the piazza, some waving flags from nations around the world and holding up signs with words of thanks for the departing head of the Catholic Church.
He ended his message with: "Let's always be close in prayer."
Sunday's Angelus will not be Benedict's final public appearance, as he is scheduled to hold a general audience Wednesday, according to the Vatican.
He will hold a "meet and greet" with cardinals late Thursday morning before stepping down the same evening, the Vatican website said.
Benedict was dean of the College of Cardinals in 2005 when he became the sixth German to be picked as pope, albeit the first since the 11th century.
At the time, the church was facing several pressing issues, including a growing crisis over the church's role in handling molestation accusations against priests around the world.
The pontiff will leave office at 8 p.m. on February 28, two-and-a-half weeks after he shocked the Roman Catholic world by announcing his resignation.
The Vatican has said a new pope will be in place for the church's Easter celebrations on March 31.
Benedict will begin his retirement in the papal summer residence in Castel Gandolfo before he withdraws to a monastery being built for him in Vatican City, a Vatican spokesman has said.
He will then lead a cloistered life, the spokesman said.
CNN's Ben Wedeman reported from Vatican City, and Ben Brumfield reported and wrote from Atlanta. CNN's Hada Messia contributed to this report.