ISTANBUL, Turkey - Pope Benedict XVI prayed alongside an Islamic cleric in Turkey's most famous mosque Thursday in a dramatic gesture of outreach to Muslims after outrage from the pontiff's remarks linking violence and the teachings of the Prophet Muhammad.
The pope bowed his head and closed his eyes for nearly a minute inside the Blue Mosque after Mustafa Cagrici, the head cleric of Istanbul, said: "Now I'm going to pray."
As the pope left the famous 17th century mosque, the pope turned to Cagrici and thanked him "for this moment of prayer," the Italian news agency ANSA reported.
"This visit will help us find together the way of peace for the good of all humanity," the pope said during only the second papal visit to a Muslim place of worship. Benedict's predecessor, John Paul II, visited a mosque in Syria in 2001.
The mosque visit was added to Benedict's schedule as a "sign of respect" during his first papal trip to a Muslim nation, the Rev. Federico Lombardi, the Vatican spokesman, said last week.
The pope removed his shoes before entering the carpeted expanse of the mosque, which is officially known as the Sultan Ahmet Mosque after the Ottoman sultan Ahmet I, who ordered its construction. But it's widely called the Blue Mosque after its elaborate blue tiles.
Benedict received a gift of a glazed tile decorated with a dove and a painting showing a view of the Sea of Marmara off Istanbul. The pope gave the imam a mosaic showing four doves.
"Let us pray for brotherhood and for all humanity," the pope said in Italian.
Lombardi said the pope "paused in meditation" inside the mosque and "certainly his thoughts turned to God."
The pope has offered wide-ranging messages of reconciliation to Muslims since arriving in Turkey on Tuesday, including appeals for greater understanding and support for Turkey's steps to become the first Muslim nation in the European Union.
But Benedict also has set down his own demands.
After a deeply symbolic display of unity with Ecumenical Patriarch Bartholomew I, the spiritual leader of the world's Christian Orthodox, the pope again repeated his calls for greater freedoms for religious minorities and lamented the divisions among Christians - including the nearly 1,000-year rift between Catholics and Orthodox.
"The divisions which exist among Christians are a scandal to the world," Benedict said after joining Bartholomew to mark the feast day of St. Andrew, who preached across Asia Minor and who tradition says ordained the first bishop of Constantinople, now called Istanbul.
The symbolism of the Orthodox Liturgy was highly significant to Roman Catholics. Andrew was the brother of St. Peter, who was martyred in Rome and is considered the first pope.
Benedict has made outreach to the world's more than 250 million Orthodox a centerpiece of his young papacy and has set the difficult goal of full unity between the two ancient branches of Christianity, which split nearly 1,000 years ago over disputes, including the extent of papal authority.
It's also a key part of the pope's drive to reinforce Christian bonds in Europe and around the world.
He said all Christians should "renew Europe's awareness of its Christian roots, traditions and values, giving them new vitality."
In a joint statement, the pope and patriarch stressed the need to "preserve Christian roots" in European culture while remaining "open to other religions and their cultural contributions."
The comments could send conflicting signals to Turkey after the Vatican suggested there was room in the European Union for its first Muslim member. They could also serve as a rallying point for groups opposed to bringing a predominantly Muslim country into the bloc.
The pope also recalled how the faith was shaped by the encounters of early Christians with the scientific and intellectual traditions of ancient Greece. It was the same theological backdrop - faith and reason - that was the basis for his explosive remarks in September on violence and the Prophet Muhammad.
Benedict avoided any direct mention of Islam after praying with Bartholomew at the gilded St. George Church in Istanbul - which as Constantinople was the capital of Christian Byzantium before falling to Muslim forces in 1453.
But the pope urged "all world leaders to respect religious freedom as a fundamental human right."
Benedict, making his first papal visit to a predominantly Muslim nation, had previously said Muslim demands for greater respect in the West must be matched by increased tolerance and freedoms for Christians in Islamic nations.
The joint statement listed "religious freedom" as one of the hallmarks of the EU - a clear reference to Turkey and its efforts to join the bloc.
The pontiff also visited the 1,500-year-old Haghia Sophia, a domed complex that once was a spiritual center of Christianity and was converted to a mosque in the 15th century. The site became a museum following the sweeping secular reforms that formed modern Turkey in the 1920s.
Wearing white robes, Benedict listened as a museum official explained the site's remarkable mix of Quranic calligraphy and the Christian symbols that remained, including a frescoes and mosaics of figures revered by Islam such as Jesus and the Virgin Mary.
Security was extremely tight, including snipers on the minarets added to Haghia Sophia following the Muslim conquest.
About 150 nationalists protested the pope's visit to the site, gathering at a square less than a mile away and urging the government to open the museum to Muslim worship. Nationalists view the planned visit as a sign of Christian claims to the site and a challenge to Turkish sovereignty.
"Haghia Sophia is Turkish and will remain Turkish," one protest sign read. Riot police surrounded the demonstrators to prevent them from advancing toward the site.
The pope's deepening ties with Bartholomew - called the "first among equals" among Orthodox leaders - also is watched with suspicion in Turkey as a possible challenge to state-imposed limits on Christian minorities and others.
Turkey does not acknowledge Bartholomew's global status and considers him as the leader of 2,000-member Greek Orthodox community remaining in Turkey. Greek Orthodox leaders have hoped the papal visit would increase pressure on Turkey to reform rules governing religious minorities, including lifting educational laws that forced the closure of Istanbul's only Greek Orthodox seminary more than 20 years ago.
Of Turkey's 70 million people, some 65,000 are Armenian Orthodox Christians, 20,000 are Roman Catholic and 3,500 are Protestant, mostly converts from Islam. Another 23,000 are Jewish.