The event was one of the largest Catholic celebrations Germany has witnessed. The vast crowd of flag-waving pilgrims gathered on the site of the Mass, a former open-cast mine on the outskirts of Cologne, was estimated at between 800,000 and a million.
Wearing a gold mitre and white and gold robes, Benedict XVI was greeted by waves of cheers as he appeared beneath a specially built transparent cupola resembling a flying saucer as the sun broke through a grey, cloud-filled sky.
Urging his audience to make wise use of the freedom God had given them, he told the crowd: "Freedom is not simply about enjoying life in total autonomy. It is rather about living by the measure of truth and goodness, so that we ourselves can become good."
The 78-year-old pontiff warned about the rise of consumerism which he said had led to a "strange forgetfulness of God". He called on young people to reject what he described as "do-it-yourself" religion. "Religion constructed on this basis cannot ultimately help us. Help people to discover the true star which points out the way to us: Jesus Christ."
The size of the crowd meant many who had spent the night camping out in the open were obliged to watch images of the Pope flashed up on huge video screens surrounding the site. As the pontiff approached in his tall, glassed-in popemobile, hymns rang out as thousands of priests clad in black and purple stood in line to participate in the Mass.
Cologne police admitted yesterday that they had been overwhelmed by the event. The sheer volume of people attending the celebrations forced closure of the city's main railway station. More than 57 people were treated for injuries and exhaustion on Saturday night after becoming immersed in the crush of pilgrims gathered at the site of the Mass.
The event - which was being described as the "Pope's Woodstock" in the German media yesterday - was the climax of Benedict XVI's four-day visit to his homeland to preside over the World Youth Day, a major Catholic celebration held in different countries every three years that was started by the late Pope John Paul II.
Before embarking on what was his first trip abroad since his election last April, the Pope said he hoped his visit would help spark "a new wave of faith among young people".
The visit had a special significance for Germans. The Pope, who was raised in Nazi Germany, was briefly a member of the Hitler Youth and served as a member of an anti-aircraft unit during the closing stages of the Second World War.
Horst Köhler, the German President, said the Vatican's choice of the former German Cardinal Joseph Ratzinger as Pope was a sign of reconciliation between the Catholic Church and Germany 60 years after the end of the war.
During his visit, the Pope attended the Cologne synagogue where he publicly condemned the evils of the Nazi era and issued a stark warning about the rise of new anti-Semitism. But he declined to respond to Jewish leaders' demands that the Vatican throw open all its archives to reveal the extent of the Church's complicity with the Nazis during the Second World War.
On Saturday, in his first address to Islamic leaders, the Pope appealed to Muslims to help combat the spread of terrorism and said that the future depended on Christian-Muslim dialogue which could not be reduced to "an optional extra".
Although the Pope's visit received blanket coverage in the German media, Germans were vastly outnumbered by Catholics from Spain, France, Italy, Poland and the Americas attending the World Youth Day celebrations. Waning support for the Catholic Church in Germany was underlined by an opinion poll last week which found that Germans trusted the police and the country's largest cut-price supermarket chain more than Pope Benedict XVI.