A diplomatic thaw between Israel and Turkey has created challenges for Palestinian Islamist group Hamas, which counts on Ankara's support, but could also offer it a more "trustworthy" middleman to deal with the Jewish state, experts say.

With Turkey's ties to Israel effectively broken for more than a decade, President Recep Tayyip Erdogan has fostered a close relationship with Hamas, which took power in the Gaza Strip in 2007.

In addition to providing financial and logistical support to the group, which is considered a terrorist organisation by much of the West, Turkey is also home to senior Hamas officials, including Salah al-Aruri, a long-standing Istanbul resident.

Hamas leader Ismail Haniyeh and former chief Khaled Meshal visit Turkey often.

Erdogan is a vocal supporter of the Palestinian cause and a fierce critic of Israel -- but he altered regional strategy earlier this year by initiating an outreach to Israel.

Ties between the two countries had collapsed in 2010 following the death of 10 civilians in an Israeli raid on the Turkish Mavi Marmara ship, part of a flotilla trying to breach a blockade to carry aid into Gaza.

Protesters hold Palestinian and Turkish national flags, as well as flags of the Islamist group Hamas, during a protest in Turkey against Israel's deadly air strikes on Gaza last May
Protesters hold Palestinian and Turkish national flags, as well as flags of the Islamist group Hamas, during a protest in Turkey against Israel's deadly air strikes on Gaza last May AFP / Adem ALTAN

But Erdogan took a step towards reconciliation by calling Israeli President Isaac Herzog following his inauguration in July.

He then hosted Herzog in Ankara last week, the first trip by an Israeli head of state to Turkey since 2007, in a visit both men hailed as a turning point in bilateral relations.

Experts have said that Erdogan's move towards Israel had little to do with Palestinian affairs, and that the Turkish leader was likely motivated by a desire to shore up his struggling economy through improved ties with a key regional economic power.

But Hamas will feel the effects of the rapprochement, said Mokhaimer Abu Sa'ada, a political scientist at Al-Azhar University in Gaza.

"Hamas is concerned," he told AFP.

Turkey has taken steps towards mending ties with Israel, effectively broken for more than a decade, and Israeli President Isaac Herzog visited Ankara in March
Turkey has taken steps towards mending ties with Israel, effectively broken for more than a decade, and Israeli President Isaac Herzog visited Ankara in March GPO via AFP / Haim ZACH

"Israel is expected to increase the pressure on the Turkish authorities. I expect that Hamas leaders will leave, perhaps for Beirut or Iran, because Istanbul will no longer be welcoming."

Sources involved in the Erdogan-Herzog bilateral talks, who requested anonymity, said the presidents discussed the presence of Hamas leaders in Turkey, a longstanding Israeli grievance.

Hamas issued a condemnation of Turkey's decision to welcome "the Zionist occupation president", but it did not mention Turkey or Erdogan directly, a move experts saw as an attempt to safeguard essential ties with Ankara.

A senior Hamas figure told AFP that his group does not interfere in the internal politics of any country and wishes to "preserve a good and balanced relationship with all Arab and Muslim countries, and particularly with Turkey".

Hamas "will not sacrifice its relations with Turkey" over the Israel outreach, said Naji Shourab, also a political scientist at Al-Azhar University.

He noted there may even be an upside for Hamas in Erdogan repairing ties with Israel. Hamas does not talk to Israel directly, but needs an interlocutor to deal with the Jewish state.

Egypt has played that role in recent years, notably negotiating a ceasefire between the sides to end an 11-day conflict last May.

But Hamas's ties with Egyptian President Abdel Fattah al-Sisi are undermined by perpetual mistrust. Sisi ousted Egypt's late Islamist president and Hamas ally Mohamed Morsi in 2013.

"Turkey is a more effective and trustworthy channel to pressure Israel than Egypt is," Shourab said.

Hossam al-Dajani, an expert in Islamist movements, told AFP that Turkey will also seek to retain its close Hamas ties because its support for the Palestinians earns Ankara credit in the Muslim world.