Pope Benedict XVI prayed alongside an Islamic cleric in one of Turkey's most famous mosques 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 for nearly a minute after Mustafa Cagrici, the head cleric of Istanbul, said: "Now I'm going to pray." "This visit will help us find together the way of peace for the good of all humanity," the pope said before leaving the 17th-century Blue Mosque in 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. The pope 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 painting showing four doves. "Let us pray for brotherhood and for all humanity," the pope said in Italian. 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 described the divisions among Christians - including the nearly 1,000-year rift between Catholics and Orthodox - as a "scandal to the world."