Pope Francis begins a visit to Turkey on Friday with the delicate mission of strengthening ties with Muslim leaders while condemning violence against Christians and other minorities in the Middle East.

His three-day trip comes as Islamic State insurgents have captured swathes of Iraq and Syria just over Turkey's southern borders, declaring an Islamic caliphate and killing or driving out Shi'ite Muslims, Christians and others who do not share their ultra-radical brand of Sunni Islam.

Officials said religious tolerance and fighting extremism would be high on the agenda in Ankara on Friday when Francis meets President Tayyip Erdogan and Mehmet Gormez, the top cleric in the majority-Muslim but constitutionally secular nation.

Turkey is sheltering close to 2 million refugees from Syria. For some of the thousands of Christians among them, that is a reversal of their ancestors' flight a century ago, when World War One and the emergence of the post-Ottoman Turkish state made Turkey a hostile land.

In Istanbul, the leader of the world's 1.2 billion Roman Catholics will meet Ecumenical Patriarch Bartholomew, spiritual head of 300 million Orthodox Christians worldwide, as part of an effort to forge closer ties between the ancient western and eastern wings of Christianity.

They will issue joint calls on human rights and religious freedom as well as on the fear that Christianity is disappearing from its birthplaces in the Middle East, according to Rev. Dositheos Anagnostopoulos, spokesman for the patriarchate.

Syria's total Christian minority made up around 10 percent of the population of 22 million before its civil war began in 2011, while Iraq's Christian population has fallen by nearly 70 percent since the start of its 2003 war.

Francis said on Tuesday that while it was "almost impossible" to have a dialogue with Islamic State insurgents, the door should not be shut.

The Turkey trip will be the third by Francis to a mainly Muslim nation, after Jordan and Albania. Anagnostopoulos said Francis may pray inside Istanbul's Hagia Sophia, one of Christendom's greatest cathedrals for 900 years, one of Islam's greatest mosques for another 500, and now officially a museum.

Such a move could upset some Muslims in Turkey, who would like to see it revived as a mosque.

There is controversy over the venue for his meeting with Erdogan. Francis, renowned for his humble lifestyle, will be the first guest in the president's lavish new 1,000-room palace.