"If a pope clearly realizes that he is no longer physically, psychologically and spiritually capable of handling the duties of his office, then he has a right, and under some circumstances, also an obligation to resign," Benedict said in the 2010 book "Light of the World."
But he stressed that resignation was not an option to escape a particular burden, such as the sex abuse scandal.
"When the danger is great, one must not run away. For that reason, now is certainly not the time to resign. Precisely at a time like this one must stand fast and endure the situation," he said.
The Vatican newspaper, L'Osservatore Romano, said Benedict decided to resign after his March 2012 trip to Mexico and Cuba, an exhausting but exhilarating visit where he met with fellow-octogenarian Fidel Castro and was treated to a raucous and warm welcome.
Although popes are allowed to resign, only a handful has done it -- and none for a very long time.
The last pope to resign was Pope Gregory XII, who stepped down in 1415 in a deal to end the Great Western Schism, a dispute among competing papal claimants. The most famous resignation was Pope Celestine V in 1294; Dante placed him in hell for it.
There are good reasons why others haven't followed suit, primarily because of the fear of a schism with two living popes. Lombardi sought to rule out such a scenario, saying church law makes clear that a resigning pope no longer has the right to govern the church.
When Benedict was elected in 2005 at age 78, he was the oldest pope chosen in nearly 300 years. At the time, he had already been planning to retire as the Vatican's chief orthodoxy watchdog to spend his final years writing in the "peace and quiet" of his native Bavaria.
On Monday, Benedict said he plans to serve the church for the remainder of his days "through a life dedicated to prayer." The Vatican said after he resigns he will travel to Castel Gandolfo, the papal summer retreat south of Rome, and then live in the monastery.
All cardinals under age 80 are allowed to vote in the conclave, the secret meeting held in the Sistine Chapel where cardinals cast ballots to elect a new pope. As per tradition, the ballots are burned after each voting round; black smoke that snakes out of the chimney means no pope has been chosen, while white smoke means a pope has been elected.
There are currently 118 cardinals under age 80 and thus eligible to vote, 67 of them appointed by Benedict. However, four will turn 80 before the end of March. Depending on the date of the conclave, they may or may not be allowed to vote.
Benedict in 2007 passed a decree requiring a two-thirds majority to elect a pope, changing the rules established by John Paul in which the voting could shift to a simple majority after about 12 days of inconclusive balloting. Benedict did so to prevent cardinals from merely holding out until the 12 days had passed to push through a candidate who had only a slim majority.
Contenders to be Benedict's successor include Cardinal Angelo Scola, archbishop of Milan; Schoenborn, the archbishop of Vienna, and Cardinal Marc Ouellet, the Canadian head of the Vatican's office for bishops.
Longshots include Cardinal Timothy Dolan of New York. Although Dolan is popular and backs the pope's conservative line, being from a world superpower would probably hurt his chances. That might also rule out Cardinal Raymond Burke, an archconservative and the Vatican's top judge, even though he is known and respected by most Vatican cardinals.
Cardinal Antonio Tagle, the archbishop of Manila, has impressed many Vatican watchers, but at 56 he is considered too young.
Cardinal Peter Kodwo Appiah Turkson of Ghana is one of the highest-ranking African cardinals at the Vatican, currently heading the Vatican's office for justice and peace, but he's something of a wild card.
There are several "papabiles" in Latin America, though the most well-known -- Cardinal Oscar Andres Rodriguez Maradiaga of Honduras -- is considered far too liberal to be elected by such a conservative College of Cardinals.
Whoever it is, he will face a church in turmoil: The sex abuse scandal has driven thousands of people away from the church, particularly in Europe. Rival churches, particularly evangelical Pentecostal groups in the developing world, pose new competition. And as the pope himself has long lamented, many people in an increasingly secular world simply believe they don't need God.
The timing of Benedict's announcement was significant: Lent begins this week on Ash Wednesday, the most solemn period on the church's calendar that culminates with Holy Week and Easter on March 31. It is also the period in which the world witnessed the final days of John Paul's papacy in 2005.
The timing means that there will be a spotlight cast on Cardinal Gianfranco Ravasi, the Italian head of the Vatican's culture office who has long been on the list of "papabile." Benedict selected him to preside over the Vatican's spiritual exercises during Lent.
And by Easter Sunday, the Catholic Church will almost certainly have a new leader, Lombardi said -- a potent symbol of rebirth in the church on a day that celebrates the resurrection of Christ.
Daniela Petroff contributed from Vatican City, Thomas Adamson from Paris and Philipp-Moritz Jenne in Vienna.