AKP supporters demonstrate against the coup attempt in the historic city of Istanbul, Turkey (Image: Wikimedia Commons).

During the late hours of July 15, 2016 a small but powerful group of rebels from the Turkish armed forces attempted a coup d'état in Turkey with support of their civilian sympathizers. By the morning of the following day this attempt to overthrow President Recep Tayyip Erdogan had failed, resulting in the government taking back full control of the country with overwhelming support from the civilian population. The events of the 2016 coup attempt left over 300 people dead and gave the government an opening to declare a state of emergency and initiate a crackdown on dissidents — both known and suspected — which is unprecedented in magnitude for a 21st century democracy and a NATO member state.

The ongoing 'corrective' measures aimed at consolidating the government's hold in the aftermath of the failed coup attempt have included widespread arrests of government and military officials. More alarmingly there has also been a large scale crackdown on academicians, journalists, intellectuals and human rights activists — something that President Erdogan sought even before the coup attempt. This ongoing crackdown has been criticized as being overly excessive by observers from both within Turkey and outside the country. These events have influenced more than just the domestic politics of Turkey, and are bound to have far-reaching impact on the country's foreign policy.

After the government regained control, its relations with the United States of America appeared to be the first and most immediate causality in terms of international relations. The Turkish government blamed the orchestration of the coup attempt squarely on Muhammed Fethullah Gulen, an influential Turkish preacher with progressive leanings who has taken up residence in the US after falling out of favor with Erdogan in 2013. It has, since then, issued an arrest warrant for Gulen and has aggressively asked the US to extradite him. The Obama administration, which considers Erdogan's Turkey as an ally, at least officially, has politely and repeatedly requested more evidence from Turkey — burying the Turkish request in a bureaucratic labyrinth.

The US position of not extraditing a wanted man to its NATO ally has caused considerable chagrin to Erdogan and his Justice and Development Party (AKP) allies in Turkey. Prime Minister Binali Yıldırım recently concluded that extradition of Gulen was 'the main element' for improving US-Turkey ties and the future of 'anti-Americanism in Turkey' depended on this one demand. Turkish media reports following the coup attempt were rife with speculation and conjecture, with a theory that the coup attempt had covert American military support gaining ground. It took no less than the Chairman of the Joint Chiefs of Staff General Joe Dunford to come out openly and denounce allegations of US involvement as 'absurd'. Although the bilateral relationship between the two countries has been uneasy in the past overt acrimony between the two sides has never surfaced so openly. The US may very well be considering removal of its nuclear weapons from the Incirlik Air Base following disturbances and lack of stability in Turkey. There are also calls for Turkey's removal from NATO.

Unsurprisingly, Ankara is looking for other options in order to avoid potential isolation. And its boldest outreach attempt came in the form of President Erdogan's state visit to St. Petersburg for a meeting with his Russian counterpart Vladimir Putin — quite a departure from the events of November of last year when Turkey shot down a Russian SU-24 involved in the Syrian conflict, and warned Russia to remember that it was a powerful 'NATO ally'. President Putin — who also considers the Trump Campaign and Brexit as external developments agreeable to Russia — responded favorably to Erdogan's outreach. However, it will take both time and effort to undo the misgivings that the two sides have harbored for each other over the last eight months.

The US was not the only one to invoke the ire of the Turkish government. Response from several European Union member states and, indeed, the EU itself was seen by the Erdogan camp as being tepid and delayed during the coup attempt, and thus amenable to the rebels. This is in stark contrast to the early shows of solidarity from Israel and Iran, who are not Turkey's traditional allies. Furthermore, the EU's calls for restraint during the aftermath of the coup attempt was seen as an outright impingement on Turkish sovereignty.

Differences between the EU and Turkey predate the events of July 2016 and have a well documented history of their own. The two have drifted close to each other and fallen apart depending on the extent of overlap in mutual interests in the past. However, Turkey's longstanding ambition of joining the EU as a full member may have been dealt its most decisive blow yet as the AKP and President Erdogan continue to take measures seen as oppressive and contrary to the libertarian norms of the EU.

The Turkish government thus appears eager to diversify its options and mend fences with estranged neighbors other than Russia, including Israel and Iran — initiating new diplomatic engagement with both states. All this points towards the fact that Turkey's foreign policy is in a state of flux and its long held alliances are becoming increasingly vulnerable due to the actions and demands of its own elected representatives. This is quite a stark contrast from the time when Erdogan appeared assured of his position as a strong ruler and a NATO ally, and would aggressively deliver pronouncements on affairs of the world from Xinjiang to Myanmar.

In fact, as recently as May of this year Erdogan provocatively condemned the hanging of Bangladeshi war criminal Motiur Rahman Nizami and lavished him with praise by calling him a 'mujahid' with 'no earthly sin'. Erdogan's Turkey is also accused of providing help to the Muslim Brotherhood elements opposed to the military government of Abdel Fattah el-Sisi in Egypt, provoking the Middle Eastern Power in the process. In a telling retort, a proposed UNSC resolution meant to condemn the coup attempt and the ensuing violence in Turkey was reportedly shot down by Egypt, which cast aspersions on the democratic credentials of the Turkish government.

The ongoing push for the ouster of 'seditious' academicians, journalists and government figures creates an environment of uncertainty, and this is highly undesirable in the contemporary world, where a state has to depend upon not only other states but also transnational organizations in order to function effectively in the international system. As noted above both the EU and NATO have been suspicious of Ergodan's true motives behind a lengthy crackdown on dissent. These activities will predictably be taken up by vocal human rights organizations such as Amnesty International and Human Rights Watch, and this has the potential to damage Turkey's international reputation.

Furthermore, in today's global economy any prolonged uncertainty will likely affect a country's credit rating, and will mar investor confidence. Investors like predictable government behavior and a reasonable level of certainty in a country's domestic environment. But what they prefer most is stability, and that seems to be increasingly dissipating in Erdogan's Turkey. If this state of flux and uncertainty continues for a prolonged period of time then the country may see the situation worsen for its economy, and that will further limit its foreign policy options.

The coming weeks and months are going to be crucial for Turkey's survival as a viable power in the international system. In this regard, one can only hope that the measures taken by Erdogan and Yıldırım — aimed at consolidating power even through questionable means — do not end up causing lasting damage to the very country that they are sworn to protect and serve.