After six years of bitter animosity, the governments of Israel and Turkey, which once were close allies, appear to be on the verge of signing a reconciliation agreement.

Ibrahim Kalin, spokesman for Turkish President Recep Tayyip Erdogan, said this week that the two countries are "reaching the end of a lengthy process."

Yaakov Nagel, head of Israel's National Security Council, agreed that Israel and Turkey are "very close" to a rapprochement.

Story continues below advertisement

The comments came as Israeli and Turkish teams are scheduled to meet Sunday in an undisclosed European location to approve an accord that has been in the works for months. If approved, the agreement will be formally signed by both sides in July.

The deterioration in what had been a close diplomatic and military relationship was triggered in May, 2010, when Israeli commandos rappelled from helicopters onto a Turkish-owned ship, the Mavi Marmara, the flag ship in a flotilla of six vessels attempting to run Israel's naval blockade of the Gaza Strip.

A pitched battle on deck left nine Turks dead, and Ankara howling for retribution.

Until this incident, Turkey and Israel were the best of friends, although Mr. Erdogan had been increasingly critical of Israel's policy of cutting off Gaza from the outside world. Israelis loved to holiday in Turkey and the two countries' formidable military forces often held joint exercises.

After the Mavi Marmara, however, ambassadors were withdrawn, Israelis were warned not to travel to Istanbul or Antalya, and Turkey, a NATO member, refused to allow Israel to join in regional military exercises.

Turkey announced three conditions Israel must meet if it wanted to restore normal relations – a public apology, compensation to families of the victims, and the lifting of Israel's blockade of Gaza that has been in place since the militant Palestinian movement Hamas took power there in 2007.

Israel insisted all its actions were taken in self-defence.

Story continues below advertisement

Over the years, however, Israeli Prime Minister Benjamin Netanyahu issued a grudging apology for the incident and agreed that Israel would pay about $20-million in compensation.

What's new, now, is that Turkey, according to Israeli and Turkish news reports, has compromised on its third condition that the blockade of the Gaza Strip be lifted.

The agreement, according to Israelis, will allow Turkey to send an unlimited amount of aid to Gaza, but it must pass through the Israeli port of Ashdod, rather than sail directly to Gaza. In addition, Turkey will be allowed to build and supply a new hospital in Gaza, as well as a new power plant and a desalination facility.

"I believe the Palestinian people will find the agreement satisfactory since we're making progress to address the energy shortage and water crisis in Gaza," said Mr. Kalin, Mr. Erdogan's spokesman.

Not so, say some officials in Hamas. In an interview with the London-based Arabic newspaper Rai al-Youm, unnamed Hamas officials said President Erdogan had told them he was forced to "make progress on the normalization deal with Israel in order to serve Turkey's interests."

This does not mean that Turkey is giving up on its insistence that Israel's blockade of Gaza be lifted, says Soner Cagaptay, director of the Turkish Research Program at the Washington Institute for Near East Policy.

Story continues below advertisement

He believes that only "after this reconciliation agreement is signed will the parties get down to real negotiations."

They will agree to certain steps being taken immediately, he suggests, and then, "following a series of confidence-building measures" taken by each side, "the parties will move closer and closer to full normalization."

This may not be the way Hamas wanted it, Mr. Cagaptay said, but "Turkey really needs this deal."

"Things in the region are not going exactly as Turkey hoped they would," he said. Having announced years ago that Turkey would follow a policy of "zero problems with our neighbours," its initiatives ended up leaving Turkey with "nearly no friends" in the Middle East, Mr. Cagaptay said.

Turkey broke with Syria after the regime of Bashar al Assad came down heavily on protesters in the country. Since Iran backed Syria, relations between Tehran and the Turkish capital also were strained.

Not surprisingly, good relations with Russia were squandered last year when Turkey shot down a Russian bomber acting on behalf of the Assad regime. The aircraft had used Turkish airspace to launch an assault on rebel Turkmen fighters in northwestern Syria.

Story continues below advertisement

Turkey is feeling very isolated, Mr. Cagaptay noted, and hopes a renewed relationship with Israel will help it.

Israeli leaders have good connections with Russian President Vladimir Putin, for example, and might help Turkey win back some support in Moscow.

Turkey also is at odds with Washington these days over U.S. support for Kurds in northern Syria. Those Kurds are combatting Islamic State fighters trying to take over Kurdish communities, but they also are allied with the Kurdistan Workers Party (PKK) in Turkey, the group fighting for an independent homeland in Turkey.

Here too, Ankara believes Israel could help Turkey lobby influential U.S. lawmakers.

For its part, Israel also feels isolated. It faces increasing pressure from the European Union over a French peace initiative intended to force Israel into negotiations with the Palestinians.

And it hopes that large-scale Turkish construction projects in Gaza might just help keep the peace in that troubled place.