This agreement is dictated on both sides by realpolitik, with Turkey’s need for energy and Israel needing an export route for its gas

Turkey and Israel have agreed to bury their differences after a bitter dispute froze their relations for six years and have normal diplomatic relations, including ambassadors in each other’s capitals.

Given the long-standing public distaste of Turkey’s President Recep Tayyip Erdogan for Israel, and Turkish support for the people of Gaza, the news marks a massive policy turnaround. But it has been in the making for a while. To soften any shock, news of the deal – some pro-government papers are even using the word “reconciliation” – between Turkey and Israel was signalled well in advance of its announcement on Sunday evening. President Erdogan also phoned the Palestinian president, Mahmoud Abbas, on Sunday to give him advance news of the agreement.

News of negotiations between Turkey and Israel has in fact been emerging steadily since late last year, with reports that despite their differences, they had discovered that they needed each other as both regional and energy partners.

Unfinished business from the recent past is being finally got out of the way. Israel will pay Turkey $20 million as compensation to the families of 10 Turkish citizens who died in May 2010 when the Israeli army stormed an unarmed humanitarian convoy carrying relief supplies to Gaza. It has renewed its apology, first issued in 2013, for the attack. The payment of compensation, withheld until now, makes the apology substantial. It will also allow a 10,000-tonne shipload of humanitarian supplies from Turkey to unload at Gaza on Friday this week.

Both sides are portraying the agreement – which will be signed on Tuesday this week – as a victory of sorts. Turkey’s Prime Minister, Binali Yildirim, says that Turkey has secured the easing (though not the complete lifting) of the Israeli blockade on Gaza. Turkey is building homes and engaging in other projects to help the people of Gaza. Hamas officials will continue to operate from offices in Turkey.

However according to the Israeli Prime Minister Benjamin Netanyahu, the Gaza blockade will continue, while Israel will now be able to strike an agreement with Turkey for the export of its newly discovered natural gas reserves to Europe via a pipeline. The two prime ministers issued details of the agreement simultaneously, perhaps in order to lessen domestic criticism in both countries.

Realpolitik

For this is an agreement dictated on both sides not by sentiment but by realpolitik – national self-interest. With memories of the events of 2010 and afterwards still fresh, it looks very vulnerable to any possible fresh flare up in Gaza. But for the countries making it, the agreement is solidly underpinned by practical advantages on both sides.

For Ankara, one benefit of the agreement with Israel is that it reduces Turkey’s regional isolation and the number of neighbours with whom it does not have diplomatic relations. Turkish-Israeli relations were always partly the product of the more important alliance both countries had with the United States and this is still part of the picture. US President Barack Obama has been pressing both states towards a reconciliation ever since 2010. In the spring of 2013 he succeeded in persuading Netanyahu to offer Turkey an apology, a move which led the way to an ice-breaking telephone call between the prime ministers of the two countries, the first step towards last weekend’s deal.

The most obvious loose thread in the arrangement is the future of Hamas, which until now has received strong Turkish backing but whose presence in Turkey will now be confined to conventional diplomatic activity. A reported recent secret meeting between the intelligence chiefs of Turkey and Israel is believed to have ensured that even if the Hamas office in Turkey remains open, there will be clear restrictions on what its officials do.

However the geopolitics of the Middle East has shifted in the last half decade and alliances which were once utterly unthinkable are now beginning to be talked about. Yahya Bostan, a journalist on the pro-AKP Daily Sabah newspaper, says that the deal may be the prelude to a new “alliance for stability” in the Middle East. It could even, Bostan hints, include Egypt if its present government is minded to join – a remarkable suggestion in view of the open unfriendliness which has prevailed between Ankara and Cairo in the three years since the overthrow of the Morsi administration.

The obvious main basis for the new Turkish-Israeli partnership is the export of Israeli natural gas. This too has been under discussion since last year and Berat Albayrak, the minister of energy and son-in-law of Erdogan, went on record last year saying that an energy deal with Israel would require a political one as well. Netanyahu now sees Turkey as the optimum route to export gas from its Tamar and Leviathan reserves, with a pipeline running across the country, carrying more to Europe.

Warming to Russia

Turkey has been looking for potential alternative suppliers of natural gas to take the place of the Russians, since relations were frozen following the downing of a Russian air force jet on the Syrian border on 24 November. Israeli gas would be a logical alternative, at least for some years.

However there are signs that Russia’s diplomatic and economic freeze against Turkey could also be about to lift, with a statement of “regret” about the jet incident from Erdogan on Monday.

Though Russia seemed to have set its face firmly against future relations with Turkey – and banned all agricultural imports – there have been signs in the last few weeks that Moscow was responding slowly to indications from Turkey that it wanted to normalise relations.

The freeze in Turkish-Russian relations has not only hit Turkish food producers hard. Hotel bookings are said to be nearly 98 percent down and there has been uncertainty about future energy cooperation, including the construction of Turkey’s first nuclear power-plant at Akkuyu on the Mediterranean. Turkey’s media has continued to criticise Russian operations in Syria, but President Erdogan and Prime Minister Yildirim both made it clear that they wanted the restoration of relations.

The sticking point was a formal apology from President Erdogan for the shooting down of the Russian jet and the death of one of its pilots. According to Russian media sources, later confirmed by Ibrahim Kalin, a spokesperson for the Turkish president, it seems that Erdogan used a form of words in a private letter to Russian President Vladimir Putin asking relatives of the dead pilot to “excuse us”. President Putin regards this as a sufficient apology – so normal relations look like being resumed.

If that does happen, one of Moscow’s main moves is likely to be a continued guarantee of Russian natural gas supplies to Turkey – which in any case have so far not been interrupted. How far this would undermine a potential Turkish deal with Israel (by removing the need to buy additional gas) is unclear, but having come so far towards a deal with Israel neither Turkey nor the Israelis look likely to turn back easily.

David Barchardhas worked in Turkey as a journalist, consultant, and university teacher. He writes regularly on Turkish society, politics, and history, and is currently finishing a book on the Ottoman Empire in the 19th century.