After Benedict's resignation becomes effective on February 28, cardinals will meet to choose a new leader for the church.
2005: Pope Benedict XVI gives first Mass
"Before Easter, we will have the new pope," the Rev. Federico Lombardi, a Vatican spokesman, said at a news conference.
The decision was not impulsive, he said.
"It's not a decision he has just improvised," Lombardi said. "It's a decision he has pondered over."
After his resignation, Benedict, 85, will probably retire to a monastery and devote himself to a life of reflection and prayer, he said. He will not be involved in choosing a new pope or in guiding the church after his resignation, Lombardi said.
Archbishop Vincent Nichols, the president of the Catholic Bishops' Conference of England and Wales, said the decision "shocked and surprised everyone."
Read the full text of Pope Benedict XVI's declaration
"Yet, on reflection, I am sure that many will recognise it to be a decision of great courage and characteristic clarity of mind and action," he said.
Archbishop Timothy Dolan, president of the U.S. Conference of Bishops, said he was sad to see Benedict resign.
"The Holy Father brought the tender heart of a pastor, the incisive mind of a scholar and the confidence of a soul united with His God in all he did," he said. "His resignation is but another sign of his great care for the Church."
British Prime Minister David Cameron said Benedict "will be missed as a spiritual leader to millions. Cameron's Irish counterpart, Enda Kenny, praised Benedict for decades of leadership and service, as well as his decision to resign.
"It reflects his profound sense of duty to the Church, and also his deep appreciation of the unique pressures of spiritual leadership in the modern world," Kenny said.
Benedict led the church as it saw declines in his native Europe but expansions in the developing world, including Africa and Latin America.
He also was known for his conservative views on theology and church doctrine. Dolan said he "warned of a dictatorship of relativism."
But his papcy, which began in 2005 after the death of Pope John Paul II, also was marked with controversy over the sexual abuse scandal in the Catholic Church.
In 2010, The New York Times reported that church officials, including Ratzinger, had failed to act in the case of a Wisconsin priest accused of molesting up to 200 boys. The Times reported that church officials stopped proceedings against the priest after he wrote Ratzinger, who was at the time the cardinal in charge of the group that oversees Catholic Church doctrine.
Ratzinger never answered the letter, according to the Times, and church officials have said he had no knowledge of the situation. But a lawyer who obtained internal church paperwork said at the time that it "shows a direct line from the victims through the bishops and directly to the man who is now pope."
Also in 2010, the Times reported that the future pope -- while serving as the archbishop in Munich -- had been copied on a memo informing him that a priest accused of molesting children was being returned to pastoral work. At the time, a spokesman for the archdiocese said Ratzinger received hundreds of memos a year and it was highly unlikely that he had read it.
That same year, Benedict issued new rules aimed at stopping abuse. The rules included allowing church prosecution of suspected molesters for 20 years after the incidents occurred, up from 10 years previously. The rules also made it a church crime to download child pornography and allowed the pope to remove a priest without a formal Vatican trial.