Istanbul, Turkey - Pope Benedict XVI has wrapped up a momentous visit to Turkey by celebrating mass at an Istanbul cathedral and making a final appeal for freedom of religion.
During his trip, he reached out to Muslims and Orthodox Christians, while at the same time standing firm on key issues such as papal authority and Europe's Christian roots.
Coming a mere 10 weeks after the leader of the world's 1.1 billion Catholics outraged Muslims by appearing to equate Islam with violence, the four-day trip -- Pope Benedict's first to a Muslim country -- turned into a fence-mending mission.
Adding drama to diplomacy, the 79-year-old pope made a stunning conciliatory gesture on Thursday when he assumed an attitude of Muslim prayer while facing Mecca in Istanbul's Blue Mosque.
The moment was "even more meaningful than an apology" for the remarks in September, said the mufti of Istanbul, Mustafa Cagrici, who was the pope's guide during the mosque visit.
The two men, clad in long white robes, stood motionless for about two minutes, their hands crossed on their stomachs in a classic Muslim prayer attitude known as "the posture of tranquility."
"It was something beautiful, a gesture on his part," Cagrici told the Turkish daily Sabah.
In entering the mosque, Pope Benedict became only the second Roman Catholic pope to do so since the groundbreaking visit of his predecessor John Paul II to the Omeyyades Mosque in Damascus in 2001.
The visit saw unprecedented security measures -- even tighter than those laid on for US President George W. Bush in 2004 -- with large swaths of Istanbul closed down as the routes taken by the pope's motorcade were kept secret.
Even before the controversy over his remarks on Islam, Pope Benedict faced an uphill struggle to win over the Turks, having been considered the "anti-Turkish pope" for opposing Ankara's bid to join the European Union.
Turkey in the EU, he had said while still Joseph Cardinal Ratzinger, would be "a grave error ... against the tide of history."
He dealt with this by making a stunning U-turn on the issue moments after descending from his plane on his arrival in Ankara on Tuesday, offering his support for the troubled candidacy in remarks to Prime Minister Recep Tayyip Erdogan.
But he added two provisos on Thursday, saying respect for religious freedom must be a criterion for entry into the EU and calling on the bloc to ensure that its members respect the rights of their religious minorities.
It was a clear reference to complaints by the Orthodox Patriarchate of restrictions imposed on it by Turkey, including the closure of a theological seminary and the confiscation of a number of properties from Christian foundations.
Pope Benedict also returned to a familiar position when he called for a renewal of "Europe's awareness of its Christian roots, traditions and values."
The main purpose of the long-planned trip and a priority of Pope Benedict's papacy -- seeking reconciliation between the Western and Eastern rites of Christianity -- was symbolized by a Saint Andrew's Day mass on Thursday.
Saint Andrew is the Orthodox Church's patron saint who was a disciple of Jesus and the brother of Saint Peter, considered the first Catholic pope.
After meetings with Bartholomew I, spiritual leader of some 150 million Orthodox faithful, the pope described as a "scandal to the world" the schism between the feuding Christian branches dating back nearly a millennium.
But he remained steadfast on a major point of disagreement -- papal authority -- when he stressed the Vatican's "universal" role.