Turkey’s leadership seems to be at the top of its game. The country is ruled by a powerful and largely unrivaled leadership: President Recep Tayyip Erdoğan was elected in August 2014 with 52 percent of the votes, while his party of origin, the AKP—after losing the legislative election on June 7 this year—made a strident comeback in a snap vote on November 1. Also in November, Turkey chaired the G20 summit for the first time and seemed to be opening a new era with the EU after striking the so-called “refugee deal.”

Is this picture-perfect politics? Not exactly. The country finds itself embattled on several fronts. Internally, Turkey’s leadership is clamping down on the media, the judiciary and increasingly its own Kurdish population. Externally, its relationship with the West remains arduous, its Middle East policy is in shambles and the country is embroiled in a fierce, personalized and perhaps long-lasting dispute with Russia.

Erdoğan has been a towering political figure in Turkey for thirteen years. While still far from his goal of transforming Turkey’s parliamentary system into an executive one, with fewer checks and balances than found in France or the United States, the Turkish leader is in practice ruling as an executive president and making a strong imprint on the country’s foreign policy. This shows in his bare-faced opposition to Assad and in his dispute with Putin.

In the Middle East, Turkey’s “zero problems with neighbors” policy, introduced in 2009, has reached a complete halt after the revolutions in Egypt, Libya and Syria, and suffers from prevailing tensions with Iran, Israel and Iraq (where Turkish troops were recently deployed, only to be promptly withdrawn). The situation has worsened considerably since June 2014 when the so-called Islamic State in Iraq and the Levant proclaimed a “caliphate,” unleashed unseen violence on civilians and took Turkish hostages in Mosul. As a result, the Kurds of Iraq and Syria, faced with the prospect of ethnic cleansing, have turned into the best buffer force against ISIL, to the point of winning military and/or political support from the West and Russia.

Seen from Ankara, the tables have turned: the specter of an independent Kurdistan on Turkey’s southern borders is back, making the relationship with Turkey’s Kurds immensely more complicated, all while the Kurdish-origin People’s Democratic Party (HDP) has become the third-largest parliamentary group.

Against this complicated backdrop, Turkey was recently forced to confront two further game-changing developments.

First, Russia’s intervention in Syria in September, intended not just to rescue Assad from the brink but to establish a permanent military foothold of its own in western Syria, annihilated Erdoğan’s objective to promote the ouster of Assad, an Alawite leader. Russia’s move also derailed Turkey’s plans to create a no-fly zone in northern Syria, officially meant to offer protection to Syrian civilians, but in fact geared at preventing a territorial expansion of Syrian Kurds. Russia’s endorsement of the Syrian Kurds further complicated Turkey’s policy. Ankara, already unhappy with the reunification of the Kurdish districts of Kobani and Al-Jazira, viewed with alarm the close air support given by the United States to YPG. Turkey is adamant to prevent the YPG from crossing the Euphrates River westward and, possibly, control most of the Syrian border. Politically, discussions for a Syrian settlement are now dominated by Iran and Russia; Turkey will have to adjust to this new reality.

The second game-changer was the November 13 tragedy in Paris, a multi-target operation planned from Raqqa, Syria, and coordinated across several European countries. The massacre triggered new decisions on military operations on ISIL not only in Paris, but also in London and Berlin, placing heavy pressure on Ankara to become an active partner in the anti-ISIL coalition and to exert greater effort to seal the stretch of the Syrian border still under ISIL’s control. Similarly, the downing of one of its commercial airliners over the Sinai added resolve to Russia’s military intervention in Syria. The G20 meeting held in Antalya on November 16 registered noticeably more vocal U.S., European and Russian requests for decisive action by Turkey against ISIL. U.S. Secretary of Defense Ashton Carter reiterated the call while visiting Incirlik Air Base in Turkey this week.

This turn of events puts Ankara in a dire position, since its priority objectives were to hit Turkey’s own Kurdish insurgency (PKK) in eastern Turkey and northern Iraq, rather than ISIL, and to support Syrian Turkmen rebels in northwestern Syria. The deadly incident following Russia’s intrusion in Turkish airspace further complicated the situation, as it added an element of higher uncertainty to an already complex relationship between Ankara and Moscow.

Meanwhile, Turkey’s relationship with the European Union seems on the mend, at least optically. The political panic arising from the huge flow of refugees from Turkey to Greece and the rest of the EU during the summer led European leaders to embark upon a bizarre exercise of “bazaar diplomacy” with Ankara. Having struck a deal with the EU on November 29 on a Joint Action Plan concerning refugees, Turkey now wants to appear as Europe’s trusted partner. Hopefully, the deal will result in improved living conditions for Syrian refugees in Turkey (including providing food, housing, education and jobs) and better control of traffickers’ networks on the Aegean coast, where smugglers have now been arrested.

But despite bold announcements on both sides, European promises to Turkey on visas and accession negotiations are politically unpopular in Europe, and conditioned on technical benchmarks as well as votes by EU governments. In a double reversal of policy, the EU seems to disregard its political leverage on the direction of Turkey’s rule-of-law architecture while the Turkish leadership tightens its grip on the media and the judiciary, moving away from EU standards for domestic reasons while still pretending to re-energize EU accession talks.

Ironically, this odd state of affairs seems to suit both sides. Since the Turkish leadership would end up losing part of their grip on power if they were to apply EU standards on media freedom and independence of the judiciary, Ankara much prefers the semblance of an active dialogue with the EU—for example, the launching of economic talks on December 14, good for foreign investment and appearances—rather than a true accession negotiation, where the parameters are inflexible. Similarly, an EU increasingly tilting to the right and far right does not have much appetite for incorporating Erdoğan’s version of Turkey, but considers it best not to say this too loudly. Whether this exercise in reciprocal hypocrisy is good for both sides in the long term remains to be seen.

Turkey’s foreign policy outlook is increasingly torn between diverging ambitions and realities, between past roots and hard foreign policy choices imposed by current conflicts.

On the home front, President Erdoğan is constantly challenging former president Mustafa Kemal Atatürk’s Western orientation (education, lifestyle, culture and role of religion), while the country’s modern-day military and security architecture—NATO membership, Article 5 protection and missile defense shield implementation—cannot be called into question, since it is so vital to the country.

Erdoğan espoused a dream of returning to a bygone Ottoman grandeur and geopolitically establishing Turkey as a “power in the middle,” juggling relations with the West, Russia, Central Asia and the Middle East. That dream is now stumbling upon the stark new realities of ISIL (including a Western coalition that now expects a Turkey to clarify its perceived ambivalence, and a Saudi-led Muslim coalition which robs Turkey of initiative), a dispute with Russia and the emergence of a strong Kurdish power base in Iraq and Syria as well as domestically.

In 2016, the likelihood is that Turkey will remain the West's uneasy ally, often wavering between its NATO security anchor, its EU economic anchor, its nationalist leanings and its unattainable dreams of grandeur. A further regression of rule of law and worsening hostilities in the Kurdish southeast may further estrange Turkey from the West at the worst possible time.

This article was originally published by the National Interest.