As Israel and Ankara reportedly near a deal on normalizing ties, Turkish President Recep Tayyip Erdogan on Friday met the leader of Palestinian terrorist group Hamas for unscheduled talks.

Erdogan received the Doha-based Hamas leader Khaled Mashaal, whose group rules the Gaza Strip, at the Ottoman-era Yildiz Palace in Istanbul, the official Anadolu Agency reported, quoting presidential sources.

Turkish press reports have said Israel and Turkey could hold final talks on normalizing ties on Sunday but this has yet to be confirmed.

Turkish Foreign Minister Mevlut Cavusoglu said on Thursday there was a “large possibility” the negotiations would take place by the end of this month.

Turkish President Tayyip Erdogan gestures during a speech with local village and town leaders at the Presidential Palace in Ankara, on May 4, 2016. (AFP/Adem Altan)

Turkish President Tayyip Erdogan gestures during a speech with local village and town leaders at the Presidential Palace in Ankara, on May 4, 2016. (AFP/Adem Altan)

Anadolu said Erdogan and Mashaal discussed how to ease the humanitarian problems of the Palestinians and how to bridge the differences between Hamas and the other main Palestinian group Fatah, which controls the Palestinian Authority

The report made no reference to the Turkish talks with Israel.

Previously tight relations between Israel and key NATO member Turkey were significantly downgraded in 2010 after IDF commandos raided a Turkish vessel that was trying to run the Israeli naval blockade on Gaza, The soldiers were attacked by passengers and killed nine Turkish civilians in the ensuing melee. A tenth died later.

Two of Turkey’s key conditions for normalization — an apology and compensation — were largely met, leaving its third demand, that Israel lift its blockade on the Hamas-run Gaza Strip, as the main obstacle.

Channel 2 reported Thursday that under the deal the blockade on the Gaza Strip will continue, but Turkey will be allowed to send equipment and goods via the Israeli port of Ashdod and from there to Gaza. In addition, Turkey is to build a power station, a desalination plant and a hospital in the Strip.

Senior officials said the details of the deal have been coordinated with Egypt, according to the report.