Tens of thousands gathered in St. Peter's Square, Rome, Wednesday as Pope Benedict XVI gave his final general audience before making history by being the first pope to resign office since the Middle Ages.

The weekly appointment is one he keeps with the faithful and tourists to teach them about the Catholic faith.

Addressing a crowd of thousands, the pope said, "I 'd like to thank everybody for the help I have received." He said that he has experienced both joyful and difficult moments as pope.

"My heart is open to the world," the pope said. "I will continue to accompany the Church with my prayers.

"I am asking each of you to pray for me," he said.

He said that he was resigning not for his own good but for the good of the church, and he thanked the faithful for understanding his decision to resign.

Some 50,000 tickets were requested for Benedict's final master class in St. Peter's Square; thousands more people packed the main boulevard leading to the piazza to watch Wednesday's audience on giant TV screens.

On Tuesday, the Vatican said Benedict would in retirement continue to wear the white cassock of the papacy and be called "emeritus pope" or "Your Holiness," raising questions about the peculiar situation soon to confront the church: having a reigning and a retired pope, living side-by-side.

The Vatican says it foresees no problems and Benedict has said he will pray and be "hidden to the world."

Pope Benedict XVI officially steps down Thursday at 8:00 p.m. local time. The date for the conclave, the process by which the next pope will be selected, has not yet been announced.