Back then, the AKP's ministers and representatives made a not-so-convincing argument about how their developing ties with Hamas were part of a strategy intended to turn the organization and convince it to accept Israel's existence. At the same time, however, it seemed that something else was going on, especially when Erdogan remarked rather bizarrely that Hamas and the AKP were similar. Healthy doses of both ideology and geostrategy went into Turkey's cooling of relations with Israel.
It is important to recognize that even though the AKP came to power and maintained good relations with Israel for a time, the party emerged from a tradition that was anti-Zionist and has a core constituency that has been hostile to Jews. When they formed the party in 2001, Erdogan and Gul shed the anti-Western shibboleths of the older generation of Turkish Islamists, but they remained cool to Israel. That does not make either man anti-Semitic -- who knows what is in their hearts? -- but it indicated that the close strategic ties that Turkey's military forged with Israel in the 1990s were vulnerable.
On the geostrategic level, Turkey's relations with Hamas as well as with Bashar al-Assad's Syria, Iran, and Libya, along with closer ties with Saudi Arabia and the Gulf states, at the expense of Israel, were about establishing Ankara's leadership in the region and the Muslim world. The reality is this: You cannot be strategic partners with Jerusalem and be a regional leader. And the region's traditional big player, Egypt, was in decline. About the only one who believed that Egypt was a regional leader under Mubarak was Mubarak, and much of Cairo's growing irrelevance had to do with the perception among Arabs that the Egyptians were too closely aligned with Israel.
Given Ankara's goals under the AKP, cooling relations with Israel was a reasonable position to take, but the Turks seemed to have the spirit of the converted. They embraced the principles, themes, and language of anti-Israeli sentiment so common in the Arab world, but without any nuance that would allow them to continue to play in the Arab-Israeli game. The Egyptian, Jordanian, Qatari, and even Saudi governments, for example, have a long history of engaging in very public criticism of Israel, but have always managed to keep lines of communication open to manage regional crises and look out for their interests. Not so the Turks who seemed to relish burning bridges with the Israelis.
The full-throated response to perceived Israeli perfidy played well all over the Arab world, making the Turkish leader the "King of the Arab Street," but it does not do anything to get the airstrikes to stop. The double irony now is that Morsy, whose anti-Zionist credentials are beyond dispute, seems like the diplomatic troubleshooter who can put Egypt back on the map, while Erdogan's Turkey is once again left to be a mere observer of regional events.