The Blue Mosque is the best known mosque in Turkey and a popular tourist attraction. It got its popular name from the fine blue Iznik tiles in the main prayer room.
Pope John Paul II, Benedict's predecessor, made the first papal visit to a mosque during a trip to Damascus in 2001.
Pope Benedict XVI has visited Istanbul's Blue Mosque......., becoming only the second Roman Catholic pontiff to enter a mosque.
Send us your views
About 150 nationalists maintained their demonstrations against the pope's visit, saying that the Aya Sofya, which is now a museum, should be re-opened to Muslim worship.
The German-born Pope has already defused much of the tension linked to his visit, his first to a mostly Muslim country, by supporting Ankara's bid to join the European Union and praising Islam as a religion of peace.
When he was a cardinal he spoke out against Turkey joining the EU because of its Muslim roots.
The main thrust of his visit was Christian unity.
In a joint statement, the pope and Ecumenical Patriarch Bartholomew I, the spiritual leader of the world's Christian Orthodox, stressed the need to "preserve Christian roots" in European culture while remaining "open to other religions and their cultural contributions".
They also signed a common declaration that appeared to jointly support Turkish membership if it protected religious liberties.
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.