The outdoor religious celebration marked the end of a five-day gathering of Roman Catholics known as World Youth Day.
It also brought to an end the pontiff's triumphant visit to his German homeland -- his first official journey outside Italy since he was elected pope in April.
During his trip, he made an emotional visit to a Cologne synagogue -- the second time in history that a Roman Catholic pope has made such a visit. He also discussed ecumenical cooperation with Protestant Christians.
Yesterday, Pope Benedict met with a group of Muslim leaders. He told the gathering in the most forceful language he has used on the topic that they have a "great responsibility" to help fight terrorism by properly educating younger generations of Muslims to respect human life.
"Those who instigate and plan these attacks evidently wish to poison our relations, making use of all means, including religion, to oppose every attempt to build a peaceful, fair, and serene life together," Benedict said. "We all agree terrorism of any kind is a perverse and cruel fanaticism which shows contempt for the sacred right to life and undermines the very foundations of every civilized society."
"We all agree terrorism of any kind is a perverse and cruel fanaticism which shows contempt for the sacred right to life and undermines the very foundations of every civilized society."
The pope said that unless religions work together against terrorism, the world will be exposed to what he called "the darkness of a new barbarism."
Nadim Elyas, head of the Central Council of Muslims in Germany, told Pope Benedict he hopes dialogue between the Vatican and the Muslim world will become institutionalized.
Elyas said Christians and Muslims should bring an end to what he called "the black chapters of their common history."
He said the Vatican should apologize to Muslims for its transgressions just as it has done with Jews. Elyas also said the Muslim world should acknowledge what he called "its historical guilt."
Around 2 million of the 3.2 million Muslims who live in Germany are of Turkish origin. Ridvan Cakir, president of the Turkish Islamic Union, was among the Muslim leaders at yesterday's meeting with the pope.
"At the basis of all Ibrahim's religion is that all human life is sacred and that people should live together peacefully and lead their lives in a dialogue of friendly cooperation," Cakir said, according to Reuters. "And here we have the opinion of His Grace, the Pope, the Holy Father. And we are very glad to have such a message."
Many of the young Roman Catholics attending today's Mass had spent the night camped outside near the location of the open-air ceremony -- a reconstituted field west of Cologne that was once the site of a coal strip-mining operation.
The pope was due to meet with Roman Catholic bishops from Germany later this afternoon before returning to Rome by plane.For more on religious and interfaith issues, see RFE/RL's website Religion and Tolerance