The Turkish president said he and the pope had common views on almost every subject they discussed, including how to combat terrorism.

"The pope's visit is very important, given that our region and the world are going through a difficult time right now," he said.

He highlighted the fact that there were millions of desperate people who felt abandoned and exploited by groups such as the ISIL in the Middle East and Boko Haram in Africa.

"I would like to stress that terrorist organizations like al-Qaeda, the ISIL and Boko Haram emerged because of the wrong policies that have been ongoing for many years," Erdogan said.

The president also said that the world seemed to have forgotten about the atrocities committed by Syrian President Bashar al-Assad.

"The ISIL is known globally right now, and it makes headlines every day. Some measures are now being taken against it, but there has been no real talk about the man who kills his own people in Syria," Erdogan said.

"The condition of nearly seven million people in Syria who are seeking shelter outside their country is being neglected. There is also state terrorism there," he said.

About Israeli offensives at Islam’s third holiest site, the al-Aqsa Mosque, the president said the world remains insensitive to the issue.

In recent months, groups of extremist Jewish settlers – often accompanied by Israeli security forces – have repeatedly forced their way into the mosque complex.

The Turkish president also said that the outlawed Kurdistan Workers’ Party, or the PKK's terrorism, which has claimed about 50,000 lives in Turkey in the last three decades, did not get enough global attention.

Pope Francis said hundreds of thousands of people were getting affected by terrorism worldwide, especially in Syria and Iraq.

"The most basic humanitarian rules are being violated and mass exiles of minorities are taking place," the pontiff said. "Not only Christians and Ezidis, but also hundreds of thousands of people are abandoning their homes just to survive and be able to practice their religions."

He praised Turkey's efforts to shelter refugees from conflict zones.

"Turkey has showed great generosity and received many migrants," the pope noted.

Pope Francis also said the Middle East had been the scene of wars for many years, "with brothers murdering brothers."

"We must not shut our eyes to the suffering there," he added.

Pope Francis and Erdogan made the remarks after they held a private meeting at the Presidential Palace.