vis-a-vis EU accession and relations with the West
There seems little the AK Party can do to bring Turkey closer to Europe, as the mood in the EU seems quite solidly closed off to Turkey lately -- chances for accession have been slim recently anyway, since AK came to power. Some point to this incident as one in a long string of eruptions that have hurt Turkey's EU bid. Israel's Haaretz, moreover, says:
The Foreign Ministry has learned that senior European Union diplomats were highly critical of the vociferous criticism Erdogan had leveled at Israel over the operation in Gaza and for his support of Hamas.
According to one report, senior European officials said, "Erdogan wants to be part of the European Union, but now he can forget about it."
But Erdogan's move doesn't seem to have been entirely uncalculated. According to some Turkish analysis,
"Turkey's pursuit of leadership of the Middle East and the Muslim world does not automatically damage Ankara's relations with Israel and the West" suggesting, the analysis says "Turkish ties to both are built on solid footing. Turkey was among the first states to recognize Israel after the birth of the Jewish state in 1948, and since then the two countries have had close diplomatic and military relations."
"Even the AK Party's attempts to create more balance between its relations with Israel and with the Arab states have not altered the historical relationship between Turkey and Israel. In fact, under the Erdogan administration, Ankara has been mediating indirect peace talks between Israel and Syria. Despite the AK Party's Islamist roots, the current Turkish leadership is much more pragmatic in its strategic outlook than Iran and other radical Islamist actors in the region. The AK Party government is well aware that close relations with Israel, the United States and the West will allow it to enhance its influence in the Middle East and the wider Islamic world."
"Also, Ankara is trying to position itself as a go-between for the Arab/Muslim world and the West — but to do that, it needs to enhance its influence among Arabs and Muslims. Hence the harsh criticism against Israel."
"In many ways, Israel and the West would actually prefer Turkish leadership in the Middle East and the Islamic world to that of Iran or the Arab states," underlining, Stratfor analysis says "Turkey is a secular, Westernized Muslim state and a NATO ally, and it is well-positioned between the Islamic and Western spheres. From the Israeli and Western point of view, Turkish leadership could serve as a counter to radical Islamist tendencies from Iran and from Sunni nonstate actors.
More, there are suggestions that there will be little or no deterioration in the relationship between Israel and Turkey as a result of the incident.
position in Arab world
Turkey's positioning demands a look, then, at its role in the Mid-East. Here it seems to be a growing power, able, as a secular state and NATO member now run by nominal Islamists, to be a go-between for the West and the Arab street. Winning the praise of Iran could serve to bolster Turkey's soft power in the region, and disclosures that the country helped to broker talks between Israel and Pakistan demonstrate Turkey's ability to moderate regional talks. Moreover, as the BBC points out, Turkey has gained significant respect from the Arab world generally for its stance.
position domestically for AK party
Mostly, though, the move seems to have been a good way to bolster popular support at home after a difficult row over a constitutional change to allow headscarves in schools. By all accounts, Erdogan was greeted as a hero on his return, and for many, he has returned a sense of pride to the country. This should serve to bolster him despite criticism of his brash political style.