Pope Benedict XVI has spoken from his window at the Vatican for the last time, telling the faithful packed into St Peter's Square the first papal abdication in centuries was God's will and he was not abandoning the Church.

Four days before the 85-year-old's eight-year rule comes to an end, the Pope defended his shock decision to resign as dictated by his failing health; his address to tens of thousands of well-wishers was met with calls of "Viva il Papa!"

"The Lord is calling me to climb the mountain, to dedicate myself even more to prayer and meditation," the German-born pontiff said in Italian.

He said he would continue to serve the Church "in a way more in keeping with my age and my strengths". The period ahead of his departure has become swamped by controversy over the allegations now facing Cardinal Keith O'Brien

The Vatican was forced on the defensive following reports that linked Pope Benedict XVI's resignation to the alleged discovery of a network of gay prelates.

On Wednesday, the Pope will hold his last general audience in St Peter's Square and on Thursday he will meet with cardinals and then fly to the papal summer retreat south of Rome.

The papacy will become vacant at 8pm Rome time on Thursday.

Cardinals will begin meetings the next day to prepare for a secret conclave in the Sistine Chapel.