He chose the name Pope Benedict XVI and called himself "a simple, humble worker" on Tuesday.
Ratzinger emerged on the balcony of St Peter's Basilica, where he waved to a wildly cheering crowd of tens of thousands and gave his first blessing as pope. Other cardinals, clad in their crimson robes, came out on other balconies to watch him.
Pilgrims chanted "Benedict! Benedict!" as the church's 265th pontiff appeared after one of the fastest papal conclaves of the past century.
"Dear brothers and sisters, after the great Pope John Paul II, the cardinals have elected me - a simple, humble worker in the vineyard of the Lord," he said after being introduced by Chilean Cardinal Jorge Arturo Medina Estivez.
"The fact that the Lord can work and act even with insufficient means consoles me, and above all I entrust myself to your prayers," the new pope said. "I entrust myself to your prayers."
Facts and figures
Ratzinger, the first German pope in centuries, served John Paul II since 1981 as head of the Congregation for the Doctrine of the Faith. In that position, he has disciplined church dissidents and upheld church policy against attempts by liberals for reforms
He turned 78 on Saturday. His age clearly was a factor among cardinals who favoured a transitional pope who could skilfully lead the church as it absorbs John Paul II's legacy, rather than a younger cardinal who could wind up with another long pontificate.
Ratzinger is the first Germanic pope in roughly 1000 years. There were at least three German popes in the 11th century.
Benedict, which comes from the Latin for "blessing," is one of a number of papal names of holy origin such as Clement, Innocent as well as Pius.
The last Benedict, Benedict XV, served during World War I and was credited with settling animosity between traditionalists and modernists, and dreamed of reunion with Orthodox Christians.
The new pope had gone into the conclave with the most buzz among two dozen leading candidates. He had impressed many faithful with his stirring homily at the funeral of John Paul II, who died on 2 April at age 84.
White smoke poured from the Sistine Chapel and bells tolled earlier to announce the conclave had produced a pope. Flag-waving pilgrims in St Peter's Square chanted:
"Viva il Papa!".
The bells rang after a confusing smoke signal that Vatican Radio initially suggested was black, but then declared was too difficult to call. White smoke is used to announce a pope's election to the world.
It was one of the fastest elections in the past century: Pope Pius XII was elected in 1939 in three ballots on one day, while Pope John Paul I was elected in 1978 in four ballots in one day. The new pope was elected after either four or five ballots over two days.
Some leading German Catholics
lobbied against Ratzinger
"It's only been 24 hours, surprising how fast he was elected," Vatican Radio said, commenting on how the new pope was elected after just four or five ballots.
More pilgrims were pouring into St Peter's Square, their eyes fixed on the burgundy-draped balcony of St Peter's Basilica where the new pope's name was to be read out and the pontiff himself introduced.
Pilgrims said the rosary as they awaited the name of the new pope, and prelates stood on the roof of the Apostolic Palace, watching as the crowd nearly doubled in size.
Some had previously questioned whether the new pope betrayed any pro-Nazi sentiment during his teenage years in Germany during World War II.
In his memoirs, the new pope speaks openly of being enrolled in Hitler's Nazi youth movement against his will when he was 14 in 1941, when membership was compulsory. He says he was soon let out because of his studies for the
Two years later, he was drafted into a Nazi anti-aircraft unit as a helper, a common fate for teenage boys too young to be soldiers. Enrolled as a soldier at 18, in the last months of the war, he barely finished basic training.
"We are certain that he will continue on the path of reconciliation between Christians and Jews that John Paul II began," Paul Spiegel, head of Germany's main Jewish
organisation, told journalists.
In Traunstein, the German town where the pope studied for the priesthood, a room full of 13-year-old boys at St Michael's seminary jumped up and down, cheered and clapped as the news was announced.
"It's fantastic that it's Cardinal Ratzinger. I met him when he was here before and I found him really nice," said Lorenz Gradl, 16, who was confirmed by Ratzinger in 2003.
The new pope succeeds John Paul II, who gained extraordinary popularity over a 26-year pontificate, history's third-longest papacy. Millions mourned him around
the world in a tribute to his charisma.
After the bells started to ring, people on the streets of Rome immediately started heading from all directions towards Vatican City. Some priests and seminarians in clerical garb ran; nuns pulled up their long skirts and jogged towards the Vatican.
Thousands awaited the result of
the fourth successful ballot
Drivers were honking horns, and some people were closing stores early and joining the crowds.
Cardinals had faced a choice over whether to seek an older, skilled administrator who could serve as a transitional pope while the church absorbs John Paul's legacy, or a younger dynamic pastor and communicator - perhaps from Latin America or elsewhere in the developing world where the church is growing.
John Paul's legacy
It was the first time two non-Italians in a row have been named pope since seven Frenchmen reigned from Avignon rather than Rome, during what Italians called the papacy's "Babylonian captivity" of 1305-1378.
While John Paul II, a Pole, was elected to challenge the communist system in place in eastern Europe in 1978, the new pontiff faces new issues: the need for dialogue with Islam, the divisions between the wealthy north and the poor south, as well as problems within his own church.
These include the priest sex-abuse scandals that have cost the church millions in settlements in the United States and elsewhere; coping with a chronic shortage of priests and nuns in the West; and halting the stream of people leaving a church, indifferent to teachings they no longer find relevant.
Under John Paul, the church's central authority grew, often to the dismay of bishops and rank-and-file Catholics around the world.
Even though John Paul appointed all but two of the men who elected the new pope, it was no guarantee that the new man would necessarily be in his mould.
Pope John XXIII was 77 when he was elected pope in 1958 and viewed as a transitional figure, but he called the Second Vatican Council that revolutionized the church from within and opened up its dialogue with non-Catholics.
The new pope will have to decide whether to keep up the kind of foreign travel that was a hallmark of John Paul's papacy, with his 104 pilgrimages abroad.
He may already be locked into one trip - in his home country: the mid-August Catholic youth day gathering in Cologne, Germany. John Paul had agreed to visit, and organisers have already spent millions of euros (dollars) in preparations.
"With the new Holy Father, we can be assured of continuity with his predecessor and of a personality who will lead the church with great responsibility before God," Heiner Koch, the prelate in charge of the event, said.