The deal negotiated by the P5+1 with Iran on its nuclear program has been heralded by supporters as a historic agreement and regional game-changer. Much of the international criticism thus far has centered on Israeli and Gulf Arab skepticism about the deal. Overlooked in these discussions, however, is the significant impact the Iran deal is already having on other regional disputes, including Iran’s relationship with its traditional competitor, Turkey.

Operating with a caretaker government since its June 7 national elections and now heading to early elections on November 1, Turkey has opened a two-front war against the so-called Islamic State and its traditional foe, the Kurdistan Worker’s Party (PKK). Most analysts have pointed to the July 20 terror attack in Suruc and the subsequent killings of two Turkish police officers as the spark that triggered Ankara’s strategic shift. However, the fact that these events transpired immediately following the end of negotiations with Iran was not an accident. The broader trend of increased Iranian–Turkish competition is playing out regionally as Tehran’s support for the Kurds further antagonizes Ankara.

The improvement of Iran’s international standing under President Hassan Rouhani has coincided with a decline in Turkey’s global image. As Rouhani abandoned the hostile rhetoric ubiquitous to his predecessor Mahmoud Ahmedinejad, Turkish President Recep Tayyip Erdoğan’s brash and aggressive handling of various domestic and foreign crises tarnished his hard-earned reputation as the West’s most reliable Muslim partner. More importantly, as Iran pragmatically began to “de-conflict” with the U.S.-led coalition against the Islamic State while still supporting the Syrian regime of Bashar al-Assad, Turkey’s anger with Assad and comparative ambivalence to the jihadist threat prompted many in the West to question this NATO ally’s commitment and value to regional security.

Turkey’s position vis-à-vis Iran in recent years has undergone a major shift, as has its broader Middle East neighborhood policy. Ankara’s soft-power charm offensive throughout the region ran up against the so-called “Arab Spring” and hard power realities, falling short of its ambitions for a neo-Ottoman role in the region. Meanwhile, Tehran has been eagerly anticipating a final nuclear settlement that would once again open Iran up to international markets. During the days of Ahmadinejad, Turkey was Iran’s largest trading partner and a key international advocate. Ankara repeatedly called for lifting international sanctions, as they inhibited the economic growth of its own eastern provinces, many of which engaged in black market trading with their Iranian neighbors just across the border. The pinnacle of this relationship was the infamous Tehran Declaration that Brazil and Turkey proudly announced with Iran in 2010. Despite being quietly killed by Washington because of “miscommunications,” the deal in many ways set the parameters and precedent for subsequent negotiations and the final Iran deal.

So why aren’t more Turkish officials applauding the signing of the Iran deal and the ending of the sanctions regime? First of all, experts disagree on the extent that Turkey will benefit from Iran’s return to the global economy or how investment that once was destined for Turkey may begin to find its way to Iran as the hot new regional destination. But more importantly, the JCPOA threatens Turkey’s regional position, given both Iran’s use of proxies across the region and, specifically, Tehran’s tacit support of the PKK in recent months.

Look no further than Syria, where Turkey and Iran are visibly working at cross-purposes. Much to Ankara’s chagrin, developments in Syria appear to be working in Iran’s favor just as they did in Iraq after the fall of Saddam Hussein. The shifting realities on the ground are precipitating the establishment of yet another Kurdish entity along Turkey’s border, stoking fears in Ankara that the Kurds could attain their long desired state.

Turkey established a healthy working relationship with the Kurdish Regional Government in Iraq. Yet, the close association between the Syrian Democratic Union Party (PYD) and the PKK kept Ankara from developing a similar relationship with Syria’s Kurds. And although Erdoğan was in the midst of peace talks with imprisoned PKK leader Abdullah Öcalan, he believed that bridging this divide would damage his reputation amongst nationalist voters. Direct cooperation with the PYD was a domestic political risk Turkey’s president was unwilling to take given that he has lost his once reliable Kurdish votes and now must appeal to his more traditional Turkish nationalist base. Instead, Ankara collaborated with those in the Syrian opposition who would pursue regime change in Damascus while respecting Turkish sovereignty.

The flaws of this policy were exposed during the Islamic State’s siege of the Kurdish-majority town of Kobane last autumn. As the United States frantically launched airstrikes to repel the jihadist advance, Turkish tanks overlooking the battlefield stood idle. Little surprise that Turkish Kurds, feeling betrayed by the man who once depicted himself as a champion of the Kurdish peace process and Kurdish rights, cast their ballots against Erdoğan in June’s elections.

In response, Erdoğan has transformed himself into a wartime president.

Legitimized by the Suruc bombing, Turkey’s two-front military campaign against the Islamic State and the PKK reminded many in the West of its irreplaceable geostrategic value and was initially received with great fanfare. But American observers of the region largely ignored the intense media battle this operation has sparked between Ankara and Tehran. Iranian state media repeatedly accused Turkey of supporting the Islamic State, even going as far as to assert that Erdoğan’s daughter Sümeyye visited wounded jihadists in Syria, while in Turkey the pro-AKP media blamed Iran for instigating regional violence through its multifarious proxies, particularly the PKK. One pro-government Daily Sabah column went as far as claiming that the Iran deal emboldened Tehran’s support for terrorist organizations like the PKK while employing rhetoric similar to the Iran deal’s opponents in Washington. And on August 24 images circulated in the Turkish press of Iranian Interior Minister Abdolreza Rahmani Fazli visiting the Qandil Mountains where the PKK operates.

This isn’t mere propaganda. Iranian Foreign Minister Javad Zarif cancelled his scheduled visit to Ankara amidst speculation that Erdoğan refused him an official face-to-face meeting.

The revival of the Turkish–Persian balance of power — a narrative that dominated the Middle East for centuries — is just the first ripple caused by the Iran deal, and should deeply concern U.S. officials. By minimally satisfying American needs for the sake of their own, competing regional goals, both states are undermining U.S. strategy. Can Washington turn the dispute between Ankara and Tehran into an opportunity to develop a coherent Syria strategy? The odds are slim. But now more than ever the United States must be aware of these cross-purposes and factor them into its broader regional calculations.

Joshua W. Walker, Ph.D. (@drjwalk) is a Transatlantic Fellow at the German Marshall Fund of the United States and a former Senior Advisor at the U.S. Department of State who has worked extensively on Turkey.

Gabriel Mitchell (@GabiMitch) is a PhD candidate in Government & International Affairs at Virginia Tech University and the Israel-Turkey Project Coordinator at Mitvim – the Israeli Institute for Regional Foreign Policies.

Photo credit: SAC Helen Farrer RAF Mobile News Team/MOD