More and more Turkish analysts and former officials believe it is high time for Ankara to return to the Western fold to cope with the dangerous situations that have emerged and which are threatening Turkey’s vital security interests and domestic stability. The ascendance of an Iran that has made its peace with the West is also a factor that many believe will force Ankara to reappraise its current approach to the Middle East and shift from its sectarian leanings back to more neutral positions with regard to developments in the region.

The suicide attack July 20 in the town of Suruc, near the Turkish border with Syria, that killed 32 mostly young people and which carries the hallmarks of the Islamic State has effectively put the last nail into the coffin of Erdogan and Davutoglu’s already failed plans for carving out a leadership role for Turkey in the Middle East predicated on Islamic leanings.

What is clear, though, is that Ankara’s Islamist orientation under the Justice and Development Party (AKP), when it was still the pre-eminent force in Turkish politics, is no longer valid with regard to its foreign policy. The June 7 elections saw the AKP lose its parliamentary majority, which many argue is also due to its misguided Syria policy that has not only failed to topple the regime of Bashar al-Assad but has also landed serious problems on Turkey’s lap — most notably a runaway refugee crisis and the risk of Islamic terrorism — which it can’t cope with alone.

Turkey today is not the “leading country” Erdogan and Davutoglu once hoped to make it in the Middle East and the Islamic world at large. Rather, it is a country that is forced to react to adverse developments without a clearly defined master plan of what it is realistically trying to achieve.

With developments in neighboring Syria getting out of hand and momentous developments in the offing following Iran’s decision to make its peace with the West, President Recep Tayyip Erdogan and Prime Minister Ahmet Davutoglu are learning the hard way that international politics is a complicated affair requiring realistic appraisals as to what is possible and what is not.

It is not just in the Middle East, though, where Turkey’s foreign policy failures are glaring. Erdogan’s desire to see Turkey establish meaningful political and military links with powers that fall outside the Western fold, most notably with Russia and China, also ring hollow today. It will be recalled that Erdogan asked Russian President Vladimir Putin in 2013 to help Turkey join the Shanghai Cooperation Organization (SCO) — made up of China, Kazakhstan, Kyrgyzstan, Russia, Tajikistan and Uzbekistan — in return for which he said Ankara would give up on its bid to join the European Union.

That same year, Ankara signaled that it was negotiating for a missile-defense system from China — against the backdrop of much NATO-bashing in Turkey despite the country’s membership of the alliance — in an attempt to reduce its military dependence on the West. This was interpreted in Western capitals at the time as a fresh indication that Turkey was drifting away from the West and seeking new strategic partners elsewhere.

Turkey’s economic ties with Russia and China continue to flourish, of course, and the possibility that Ankara may opt for a missile-defense system from China remains officially on the table today. But political ties with these countries are proving to be more complicated than Erdogan assumed, indicating that Turkey may not get as much of a dividend from strategic ties with these powers compared with its ties with members of the Western alliance.

Turkey has serious differences with Russia and China over Syria, as these two countries continue to support Assad's regime. For all the strategic ties in the economic and energy fields, Ankara’s ties with Moscow were seriously strained in April over Putin’s support of Armenian claims about having suffered a genocide at the hands of Ottoman Turks; this resulted in Russia and Turkey exchanging uncharacteristic barbs over the issue. Turkey and Russia also diverge on Moscow’s annexation of Crimea and the rights of Crimean Tatars, who are related to Turks.

Turkey’s ties with China also were strained recently over the issue of East Turkestan and Beijing’s assimilation policies aimed at Muslim Uighurs in China’s Xingjian Uighur Autonomous Region who are also of Turkic origin.

Demonstrations in Turkey against Chinese targets, and Korean tourists mistaken for being Chinese, showed that distant as these two countries are from each other, negative sentiments between them are not hard to incite.

These strains with Russia and China show that Erdogan’s dream of joining the SCO is no more than a pipe dream and that Turkey will remain exposed on a limb, all on its own, unless it returns to its traditional and familiar fold, which in this case means working closely with its Western allies in NATO.

Retired Ambassador Unal Cevikoz, whose postings included Baku, Baghdad (where he survived an assassination attempt) and London — and who also served in NATO, establishing the alliance’s information office in Moscow in 1994 — told Al-Monitor that Turkey cannot afford to remain outside this fold any longer.

“Turkey has to urgently return to a unified outlook and systemic stance with its Western allies. Much ground has been lost from 2008 onward due to serious mistakes committed, and the situation this has landed us in today is obvious,” said Cevikoz, who writes a column in the Radikal daily and also is a member of the Board of Trustees of Kadir Has University in Istanbul.

“We have to urgently move toward policies that restore the sense of trust in us among our allies; otherwise, we will continue to remain in a bottomless pit. The time is here for the AKP, which is currently involved in negotiations for a coalition government, to be realistic and to assess the situation we are in from this perspective. The hope is that the Suruc attack will act as a wake-up call in this regard,” he added.

Cevikoz said that there were still signs that the AKP is reluctant to admit to past mistakes, but acknowledged that Ankara’s Islamic-based foreign policy was at a dead end, whether AKP officials admitted this or not.

Retired Ambassador Murat Ozcelik, currently a deputy from the Republican People's Party (CHP), which is in coalition talks with the AKP, also believes it is time Ankara turned its face back to the West and worked closely with its NATO allies.

“The AKP government has to see that it has no options left but to turn in that direction and act with its allies,” Ozcelik, a former ambassador to Baghdad, told Al-Monitor. “It has to do this even if a coalition government can’t be formed and early elections have to be held,” he added.

“This change has to also involve a return to modernity and secularism, which will also be to the advantage of the region. It is apparent that taking sides in this region along sectarian religious lines has not provided anything for Turkey and has contributed to regional instability,” Ozcelik said, adding that there was a crisis of confidence with regard to the AKP and particularly Erdogan.

Ozcelik went on to say that the attack in Suruc has highlighted the urgent need for Turkey to share intelligence with the West and to work in harmony with its Western allies. He argued that the recent increase in contacts between Turkish and US officials on security issues, as well as the attack in Suruc, which appeared retaliatory, were indications that Turkey is actually moving in that direction.