One of the surprise results of President Barack Obama’s recent trip to the Middle East was the last-minute phone call between Prime Minister Benjamin Netanyahu of Israel and Prime Minister Recep Tayyip Erdogan of Turkey that took place from a hastily set-up trailer near the Tel Aviv airport as Obama was about to leave.

The two nations had once cooperated closely and were generally viewed as strategic partners, but the Turks had begun to distance themselves from Israeli policies in early 2009 when the Turkish prime minister confronted Israel’s President Shimon Peres at a January international meeting in Davos. Referring to the slaughter of Gazan civilians earlier that month during Operation Cast Lead, Erdogan told Peres, “you know well how to kill.” In the one-hour discussion of Gaza that was moderated by David Ignatius of the Washington Post, Peres was allowed 25 minutes to speak in defense of the Israeli attack. Erdogan was given 12 minutes. During the debate, Peres pointed accusingly at Erdogan and raised his voice. When Erdogan sought time to respond, Ignatius granted him a minute and then cut him off, claiming it was time to go to dinner. Erdogan complained about the treatment and left Davos, vowing never to return. Back in Turkey, he received a hero’s welcome.

The bilateral relationship then hit zero when, in June 2010, the Israelis boarded the Turkish ferry Mavi Marmara in international waters. The Mavi Marmara had only humanitarian supplies on board, but the Israeli naval commandos from the elite Shayetet 13 unit were met by a number of Turks wielding improvised weapons made from the ship’s rails and deck chairs. The Israelis killed nine Turks, one of whom was also an American citizen; most were shot execution-style. Israel could have defused the crisis by admitting it had erred, apologizing, and offering to pay reparations, but refused to do so. Prime Minister Benjamin Netanyahu, who had personally directed the operation, claimed that the Israelis were acting in self-defense.

The Turkish connection was important because Turkey was the only predominantly Muslim country with which Israel had a truly friendly relationship. But Israel is much less important to Ankara. The prior warmth was based on common interests uniting the Israeli and Turkish militaries that never quite penetrated to the government level in Ankara, where Israel’s destabilizing role in a region that Turkey was increasingly seeing as its backyard was watched carefully. The military’s ability to influence events waned when the Turkish National Security Council, a powerful remnant of the last military coup consisting of high-ranking officers, was effectively delegitimized and broken by Erdogan. He also ordered the arrests of hundreds of senior officers who might or might not have been conspiring to overthrow him.

What is important to Erdogan is that Ankara’s strained relationship with Israel has created problems in Washington. Since the split, there have been numerous articles, mostly written by neocons, criticizing Turkey’s democratic credentials and its self-confident Islamic identity while asking whether the country is really “part of the West.” In the September 16, 2011 Washington Post Morton Abramowitz, a former U.S. Ambassador to Turkey, opined that Erdogan

now directly challenges our major alliance in the Middle East, and how far he will go is unclear … By threatening to militarily contest Israel’s blockade of Gaza … the Turkish government has laid down a serious challenge to American policy … Obama’s meeting with Erdogan on Tuesday is crucial. He can take a few important steps. He should immediately deploy 6th Fleet ships from Norfolk to the Eastern Mediterranean to signal that the United States will not tolerate even inadvertent naval clashes. He needs to make clear to Erdogan that the United States will not side with Turkey against Israel and that Turkey’s current strategy risks undermining regional stability.

In the same month, seven United States senators sent a letter to President Obama stating that

Turkey is shifting to a policy of confrontation, if not hostility, towards our allies in Israel and we urge you to mount a diplomatic offensive to reverse this course. We ask you to outline Turkey’s eroding support in Congress … and how its current ill-advised policy towards the State of Israel will also negatively reflect on U.S. Turkish relations and Turkey’s role in the future of NATO.

But the White House has never taken its eye off the ball regarding Turkey. Turkey is without any doubt the key player and most essential ally for the United States in the entire Near East region. It is frequently cited as an example of how democracy can function in a predominantly Islamic country. It is the NATO member with the largest army after that of the U.S., fought in the Korean War, has fully supported every U.S. intervention in its backyard save only Iraq in 2003, and shares long borders both with Syria and Iran. Whatever happens in Syria will largely be shaped by what Ankara decides to do, and President Obama knows it. Israel is understandably concerned about what might come out of the Syrian farrago and knows it too, so Obama was able to convince Netanyahu that if he wants to sit at the table when critical decisions are made about Syria, accommodating Turkey and Erdogan would be a necessary first step. So it was most definitely in Israel’s own interest as well as that of Washington to mend fences with Erdogan.

Netanyahu faced considerable internal opposition within his new coalition to making the call that Obama personally brokered. Netanyahu’s former Moldovan bouncer Avigdor Lieberman, who until recently provided comic relief as a foreign minister, immediately denounced the prime minister’s apology as a “serious mistake” before saying, “Such an apology harms IDF soldiers’ motivation and their willingness to go out on future missions, and strengthens the radical elements in the region. Worse still is the fact that the apology also affects Israel’s uncompromising struggle for righteousness, morality and for the morality of its soldiers.”

There was also considerable opposition from Turkey. Erdogan responded to the call somewhat reluctantly, according to Turkish sources, and only because Obama was involved. He accepted the Netanyahu apology but demanded that it first be put in writing before giving his verbal consent, reportedly because he did not trust the Israeli Prime Minister to stick with whatever wording might be agreed upon over the phone. The official Israeli version subsequently appeared in several forms in English on the Israeli Foreign Ministry website before it was agreed to by Ankara. It now reads that “Israel regrets … [due to] a number of operational mistakes … the loss of life or injury.” It agreed to “conclude an agreement on compensation/nonliability. Prime Minister Netanyahu also noted that Israel has substantially lifted the restrictions on the entry of civilian goods into the Palestinians territories, including Gaza…”

The Israeli and U.S. media initially reported that the two countries would restore full diplomatic relations, but that is incorrect. Erdogan has instructed his foreign minister, Ahmet Davutoglu, to establish a fair level of compensation for the families of the Mavi Marmara victims as well as for the shipowners, a sum likely to exceed $20 million, before improving ties in any way. And he has not committed to returning his ambassador to Tel Aviv. Turkey is also monitoring compliance with the pledge to ease entry to Gaza and the West Bank. Davutoglu reportedly sent a strongly worded message to Netanyahu regarding Israel’s new restrictions on Gazan fisherman, which went into effect two days after the three heads of government spoke on the phone.

Israel has also taken note of an independent announcement by Turkey that Erdogan would visit Gaza and the West Bank in April, while there have been rumors in the Turkish media that the current Turkish consul general in Jerusalem, Sakir Ozkan Torunlar, will be re-designated ambassador to Palestine, meaning full recognition of the Palestinian State, with all that implies.

Possibly most important of all is the fact that the Erdogan-Netanyahu agreement did not explicitly mention legal liability. In June 2012 Israel’s own state controller investigated the Mavi Marmara incident and, though absolving the military, noted “essential and significant flaws” in the operation as directed by Netanyahu. A simultaneous United Nations investigation called the use of force in the raid “excessive and unreasonable.” The Turkish Justice Ministry completed its own inquiry in the summer of 2012, resulting in criminal charges being filed against four senior Israeli military officers. That trial is scheduled to begin later this year with more than 500 witnesses prepared to provide eyewitness testimony for the in absentia proceedings. It all means that the rapprochement engineered by President Obama between Israel and Turkey is still very much a work in progress, and it is Ankara that is best placed to dictate the course of further developments.

Philip Giraldi, a former CIA officer, is executive director of the Council for the National Interest.