Editor's note: Henri J. Barkey is a professor of international relations at Lehigh University and a visiting fellow at the Carnegie Endowment for International Peace. He is co-author, with Graham Fuller, of "Turkey's Kurdish Question" and editor of "Reluctant Neighbor: Turkey's Role in the Middle East."
(CNN) -- The recent flotilla incident is the culmination of a steep decline in Israeli-Turkish relations that started with the Gaza war in 2008 and 2009. Relations between these two countries, after reaching a high point in the late 1990s and early 2000s, are now beyond repair, and it will probably take the better part of a decade for them to be resuscitated.
Turkey has also used its increasingly rancorous disputes with Israel to advance its status in the Middle East at the expense of traditional leaders across the region.
Turkey's ruling Justice and Development Party (AKP), which came to power in 2002, was always conflicted in its relations with Israel. The party emerged from a hardcore anti-Western and anti-Israeli Islamist tradition that had close ties to Hamas and Egypt's Muslim Brotherhood.
As it rose to power, however, the AKP distanced itself from these positions and even embraced the idea of joining the European Union. Still, it always maintained a critical stance when it came to Israel that was punctuated by occasional outbursts.
Turkey's relations with Israel improved when the AKP stepped into the vacuum created in the Middle East by the Bush administration's policies and orchestrated secret negotiations between Israel and Syria.
This effort fit well with the AKP's grand vision of its foreign policy -- Prime Minister Recep Tayyip Erdogan and his party were intent in making Turkey an important international player.
After punching below its weight for far too long, Ankara thought now was the time to engage in an activist policy and capitalize on its economic prowess and strategic geopolitical location. It aggressively sought a role in international institutions such as the U.N. Security Council and engaged in all kinds of diplomatic efforts from the Middle East to the Balkans and the Caucasus.
Erdogan and Turkey received many kudos for the Israeli-Syrian talks. But they came to an abrupt end with Israel's Gaza war. Erdogan felt personally betrayed by then-Israeli Prime Minister Ehud Olmert, who was in Ankara four days before launching the Gaza offensive. From then on, Turkish foreign policy vis-à-vis Israel was dramatically transformed.
We first saw this at the January 2009 Davos meetings in Switzerland when Erdogan publicly confronted Israel's President Shimon Peres and then walked off the stage. Positive reactions to his behavior in Turkey and in the Middle East provided Erdogan with the contours of Ankara's new foreign policy.
From then on, in almost every foreign policy speech, Erdogan would disparage Israel's policy in Gaza, calling the Gaza Strip an open prison. He then began to challenge Israel's nuclear arms while defending Iran against the West.
In a deliberate obfuscation of the issues, he argued that instead of criticizing Iran's peaceful nuclear program, it was Israel's not-so-secret nuclear arsenal that ought to be the object of censure.
This, of course, is a distortion of the truth as Iran was accused of violating the Non-Proliferation Treaty, of which it is a signatory while Israel is not. His singling out of Israel was purposeful but unfair; he never criticized Turkish ally Pakistan -- or India for that matter-- for having tested and deployed nuclear arms.
The flotilla crisis occurred in this atmosphere of great tension. Turkish Foreign Minister Ahmet Davutoglu claims his government cautioned the Islamist charity that organized the flotilla not to cross into Israeli waters and that they were powerless to prevent an independent, non-government organization (NGO) from acting on its own volition. Yet there are many signs that the AKP and other Turkish Islamist parties were fully supportive of the NGO and its efforts.
Hamas itself interpreted the action as an Erdogan-led effort to breach the naval blockade of Gaza.
No one, including the Israelis, could have anticipated the extent of the fallout, although a cursory look at what the organizers were claiming should have made it obvious that the NGO was clearly trying to provoke Israel and elicit an strong response.
Ultimately, it is the incompetence of the Israeli decision-makers who failed to properly analyze the groups' intentions that in many ways handed the AKP, Erdogan and Hamas a public relations victory.
Erdogan has now become a hero in the Arab street. In two years, he has managed to do what few Arab leaders could do -- push Israel into a corner. Even though Arab countries have been mistrustful of Turkey in the past, Erdogan has successfully transformed himself into the leader of the Middle East.
He is not just the defender of traditional Arab concerns but also of Iran, as he is resisting the Obama administration's efforts to impose sanctions on Iran.
The emerging hostility in Israeli-Turkish relations puts the United States in a difficult quandary. Washington does not want to side with one ally over another, and Turkey has aggressively been pushing the United States to do just that.
Washington, however, has issues with both countries.
It is upset at Turkish efforts to protect Iran from further U.N. sanctions and at Israel for making its regional diplomacy so much more difficult, not only with the flotilla fiasco but also with its hard line on the settlements and negotiations with the Palestinians. Turkey may therefore emerge as an even more significant factor in an already complicated Middle East political tapestry.
The opinions expressed in this commentary are solely those of Henri J. Barkey.