Benedict, then known as the former Cardinal Joseph Ratzinger, worked closely with Pope John Paul II for nearly a quarter-century and saw how his predecessor suffered through the debilitating end of his papacy.
So Benedict himself in 2010 raised the possibility of resigning if he were simply too old or sick to continue.
‘‘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.
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.
Monday was a holiday at the Vatican, although the pope was presiding over a ceremony to name new saints. The announcement in Latin took cardinals in the room by surprise; others inside the Vatican who were listening in to the closed-circuit recording struggled to understand the Latin.
‘‘All the cardinals remained shocked and were looking at each other,’’ said Monsignor Oscar Sanchez of Mexico who was in the room when Benedict made his announcement.
Benedict was born April 16, 1927 in Marktl Am Inn, in Bavaria, but his father, a policeman, moved frequently and the family left when he was 2.
In his memoirs, Benedict dealt what could have been a source of controversy had it been kept secret — that he was enlisted in the Nazi youth movement against his will when he was 14 in 1941, when membership was compulsory. He said he was soon let out because of his studies for the priesthood. Two years later he was drafted into a Nazi anti-aircraft unit as a helper. He deserted the German army in April 1945, the waning days of the war.
He called it prophetic that a German followed a Polish pope — with both men coming from such different sides of World War II.
Benedict was ordained, along with his brother, in 1951. After spending several years teaching theology in Germany, he was appointed bishop of Munich in 1977 and elevated to cardinal three months later by Pope Paul VI.
John Paul named him leader of the Congregation for the Doctrine of the Faith in 1981 and he took up his post a year later. Following John Paul’s death in 2005, he was elected pope April 19 in one of the fastest conclaves in history, just about 24 hours after the voting began.
Follow Nicole Winfield at www.twitter.com/nwinfield
Daniela Petroff contributed from Vatican City, Thomas Adamson from Paris and Philipp-Moritz Jenne in Vienna contributed.