FOR the first time in years, the whiff of a wind of change is wafting through Israel’s diplomatic air, thanks to Barack Obama’s recent visit. The message the American president imparted was that he is determined in his final term to have another go at making peace between Jews and Arabs in the Middle East. Though full of the usual bromides, his speech to a gathering of young Israelis percolated down to the undecided centre of Israeli politics, where distrust for Mr Obama—and for Palestinians—has been strong. The American president may have persuaded at least some such Israelis to ponder again the need for a Palestinian state.

The trip’s more tangible result, however, was Mr Obama’s apparent success in persuading Israel’s prime minister, Binyamin Netanyahu, to apologise at last to Turkey for the death of nine Turks killed by Israeli commandos in 2010 stopping a flotilla of Turkish boats from reaching Gaza.

“Israelis love Turkey,” declares the blurb of an Israeli package-tour operator, hoping to promote the resort of Antalya once again as Israel’s favourite tourist destination. On the strength of Mr Netanyahu’s apology, he may be onto a winner.

Just before Mr Obama flew out of Israel, he handed Mr Netanyahu his telephone to speak to Recep Tayyip Erdogan, Turkey’s prime minister. After nearly four years of estrangement, America’s two most powerful and closest allies in the Middle East agreed to co-operate again. Once Israel’s compensation to the Turks has been settled, diplomatic relations will be restored.

Both sides have much to gain. Israel hopes Mr Erdogan will rescue it from its isolation since the downfall of friendly regional autocrats, in particular in Egypt. The two countries may now be able to share copious amounts of natural gas recently found in the eastern Mediterranean. They should resume co-operation in military intelligence. And Israelis may soon again enjoy those tours. Even when relations were at their nadir, military sales continued, as did foreign trade worth $3 billion a year.

All the same, the Israeli-Turkish strategic relationship is unlikely to be wholly restored, not least because of Mr Erdogan’s sharp tongue. A month ago he called Zionism “a crime against humanity”, so threatening to ruin America’s bridge-building. “The 1990s are over,” says Nimrod Goren, an Israeli academic who kept open a discreet channel when even Turkish and Israeli spies refused to exchange words.

And a host of regional issues may yet prise them apart. Mr Netanyahu will turn a deaf ear to Mr Erdogan’s call for Israel to vacate East Jerusalem and the West Bank and to open up Gaza entirely. In his written apology, Mr Netanyahu said he would ease restrictions on supplies to that Palestinian coastal strip ruled by Hamas. But Israel seems bent on keeping up its blockade by air and sea, which first prompted Turkey’s flotilla to try to get there.

Meanwhile Mr Erdogan’s party people hailed the apology as a big victory. “We stood firm and brought them to their knees,” tweeted a young party activist. Ahmet Davutoglu, Turkey’s foreign minister, cut short a trip to Poland to bask in credit back home. Turkish newspapers announced that Mr Erdogan was planning a triumphal visit to Gaza, not least to see a new hospital being built by the Turks.

Unless Mr Erdogan softens his rhetoric, a showdown with Israel could easily recur. Moreover, Turkey’s prime minister is likely to rebuff Mr Netanyahu’s request to help persuade Iran to drop its nuclear ambitions. Israel has had to discount hopes that the Turks would let its fighter aircraft fly over its territory. And it has so far failed to convince the Turks that Iran is close to getting a bomb. “Even if it could,” says Alon Liel, an Israeli ex-ambassador to Ankara, “Turkey doesn’t believe it is the target.”

At least over Syria there may be scope for co-operation. After months of hesitation, Israel now agrees with Turkey that President Bashar Assad must go. Both Israel and Turkey agree that al-Qaeda should be prevented from reaping the fruits of Mr Assad’s fall. Israel, says Mr Liel, might even endorse Syria’s takeover by a Western-leaning Islamist government—at any rate, if it were modelled on Turkey’s.