ISTANBUL (CNS) — A day after hearing Turkish leaders demand the West show more respect for Islam, Pope Francis prayed alongside a Muslim cleric inside Istanbul’s most famous mosque.

At the Blue Mosque, Istanbul’s grand mufti Rahmi Yaran led Pope Francis to the mosque’s “mihrab,” a niche indicating the direction to the holy city Mecca. He explained that the name is related to that of Jesus’s mother, Mary, who is revered by Muslims.

Then, as the grand mufti continued speaking, the pope fell silent and remained so for several minutes, with head bowed, eyes closed and hands clasped in front of him. A Vatican statement later described this as a “moment of silent adoration.”

The Sultan Ahmed Mosque, an early 17th-century structure, is known as the Blue Mosque for the predominant color of the 21,000 tiles decorating its interior.

The pope’s Nov. 29 visit had been scheduled for later in the morning but was moved up, out of concern that it would interfere with noon prayers.

The event recalled the last papal visit to Turkey, in 2006, when Pope Benedict XVI’s prayer in the same mosque went far to ease an international furor over his speech in Regensburg, Germany, which had quoted a medieval description of the teachings of Islam’s prophet Muhammad as “evil and inhuman.”

For Pope Francis, the prayer was only the latest dramatic sign of a desire for closer relations with Islam, including his washing the feet of two Muslims during a Holy Thursday liturgy in 2013, and his invitation to Muslim and Jewish leaders to pray for peace in the Vatican Gardens the following year.

After his arrival in Turkey Nov. 28, Turkish President Recep Tayyip Erdogan raised the issue of prejudice and intolerance against Muslims in other countries, saying that “Islamophobia is a serious and rapidly rising problem in the West” and lamenting that “attempts to identify Islam with terrorism hurt millions.”

Later, during a visit to the Presidency of Religious Affairs, its president, Mehmet Gormez, decried what he called the “dissemination of terror scenarios by the global media through anti-Muslim expressions, which is a form of racism and which has now turned into a crime of hatred.”

After visiting the Blue Mosque, Pope Francis walked to the nearby Hagia Sofia, a sixth-century basilica converted into a mosque after the Ottoman conquest in 1453, then turned into a museum in the 20th century. The interior decoration today includes gigantic calligraphy of Quranic verses as well as medieval mosaics of Jesus and Mary. As the pope toured the museum, it was filled with the sound of the noon call to prayer from the minaret of a nearby mosque.

During both visits, as at events later in the day, the pope looked tired but attentive.

In the afternoon, Pope Francis celebrated Mass at Istanbul’s 19th-century Catholic cathedral, which ordinarily holds fewer than 600 people, but was filled to overflowing for the Mass. It was the first event during his visit to Turkey — a country whose population is less than 0.2 percent Christian — that recalled the enthusiastic crowds who ordinarily greet him on his travels.

The congregation included Catholics of the Armenian, Syriac, Chaldean and Latin rites and prayers in several languages, including Turkish, Aramaic and English. The varied music included African drumming.

Pope Francis’ homily, which acknowledged the presence of several Orthodox and Protestant leaders, focused on the challenge of Christian unity, which he distinguished from mere uniformity.

“When we try to create unity through our own human designs, we end up with uniformity and homogenization. If we let ourselves be led by the Spirit, however, richness, variety and diversity will never create conflict, because the Spirit spurs us to experience variety in the communion of the church,” he said.

The pope’s last public event of the day was an evening prayer service with Ecumenical Patriarch Bartholomew at the patriarchal Church of St. George. The service was a kind of prelude to a liturgy planned for the next day in the same church.

Like his predecessors Blessed Paul VI, St. John Paul II and retired Pope Benedict XVI, Pope Francis timed his visit to Turkey to include Nov. 30, the feast of St. Andrew, patron saint of the Ecumenical Patriarchate of Constantinople, in what is today Istanbul. As it was for the earlier popes, his primary reason for visiting was to strengthen ties with the ecumenical patriarch, considered first among equals by Orthodox bishops.

A 1964 meeting between Blessed Paul and Ecumenical Patriarch Athenagoras opened the modern period of ecumenical dialogue by lifting mutual excommunications that started the East-West schism in 1054.

Pope Francis already has a strong relationship with Patriarch Bartholomew, having met with him both at the Vatican and in Jerusalem. At the prayer service, the pope and the patriarch prayed the Our Father together in Latin, then each offered a separate blessing, respectively in Latin and Greek.

In a brief address, Patriarch Bartholomew noted that the church contains relics of St. Gregory the Theologian and St. John Chrysostom, taken by crusaders during the 1204 sack of Constantinople and returned eight centuries later by St. John Paul II.

“May these holy fathers, on whose teaching our common faith of the first millennium was founded, intercede for us to the Lord so that we rediscover the full union of our churches, thereby fulfilling his divine will in crucial times for humanity and the world,” the patriarch said.

At the end of the service, in a typically spontaneous gesture, the pope asked the patriarch to bless him and the church of Rome.