Pope Benedict XVI is to resign at the end of this month after nearly eight years as the head of the Catholic Church, saying he is too old to continue at the age of 85.
The unexpected development - the first papal resignation in nearly 600 years - surprised governments, Vatican-watchers and even his closest aides.
The Vatican says it expects a new Pope to be elected before Easter.
Cardinal Joseph Ratzinger became Pope in 2005 after John Paul II's death.
The BBC's David Willey in Rome says the move has come as a shock - but adds that in theory there has never been anything stopping Pope Benedict or any of his predecessors from stepping aside.
Under the Catholic Church's governing code, Canon Law, the only conditions for the validity of such a resignation are that it be made freely and be properly published.
But resignation is extremely rare: the last Pope to step aside was Pope Gregory XII, who resigned in 1415 amid a schism within the Church.
A Vatican spokesman, Father Federico Lombardi, said that even Pope Benedict's closest aides did not know what he was planning to do and were left "incredulous". He added that the decision showed "great courage" and "determination".
Italian Prime Minister Mario Monti is quoted as saying he was "greatly shaken by this unexpected news".
The brother of the German-born Pope said the pontiff had been advised by his doctor not to take any more transatlantic trips and had been considering stepping down for months.
Talking from his home in Regensburg in Germany, Georg Ratzinger said his brother was having increasing difficulty walking and that his resignation was part of a "natural process".
He added: "His age is weighing on him. At this age my brother wants more rest."
The Pope is not expected to take part in the conclave that will choose his successor, and will then retire to the papal residence at Castel Gandolfo when he leaves office.
Father Lombardi said the Pope would then move into a monastery of cloistered nuns inside the Vatican, for "a period of prayer and reflection".
At 78, Cardinal Joseph Ratzinger was one of the oldest new popes in history when elected.
He took the helm as one of the fiercest storms the Catholic Church has faced in decades - the scandal of child sex abuse by priests - was breaking.
In a statement, the pontiff said: "After having repeatedly examined my conscience before God, I have come to the certainty that my strengths, due to an advanced age, are no longer suited to an adequate exercise of the Petrine ministry.
"I am well aware that this ministry, due to its essential spiritual nature, must be carried out not only with words and deeds, but no less with prayer and suffering.
"However, in today's world, subject to so many rapid changes and shaken by questions of deep relevance for the life of faith, in order to steer the boat of Saint Peter and proclaim the Gospel, both 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 recognise my incapacity to adequately fulfil the ministry entrusted to me.
"For this reason, and well aware of the seriousness of this act, with full freedom I declare that I renounce the ministry of Bishop of Rome, Successor of Saint Peter, entrusted to me by the cardinals on 19 April 2005, in such a way, that as from 28 February 2013, at 20:00 hours, the See of Rome, the See of Saint Peter, will be vacant and a conclave to elect the new Supreme Pontiff will have to be convoked by those whose competence it is."
A theological conservative before and during his time as Pope, he has taken traditional positions on homosexuality and women priests, while urging abstinence instead of blessing the use of contraceptives.
His attempts at inter-faith relations were mixed, with Muslims, Jews and Protestants all taking offence at various times, despite ongoing efforts to reach out and visits to key holy sites, including those in Jerusalem.
A German government spokesman said he was "moved and touched" by the surprise resignation of the pontiff.
"The German government has the highest respect for the Holy Father, for what he has done, for his contributions over the course of his life to the Catholic Church.
"He has left a very personal signature as a thinker at the head of the Church, and also as a shepherd."