The current military-diplomatic crisis between Turkey and the United States, which is being portrayed by Ankara as a case of “clear hostility,” was long in coming and entirely predictable. It is primarily rooted in a perennial Turkish fear that Turkey may be dismantled—the so-called Sèvres Syndrome—and recurrent conspiracy theories that Western powers have sought the partition of the country since the creation of the republic in 1923.

But Ankara’s current narrative of the crisis has two domestic political causes of major importance. First, in the June 2015 legislative elections, the Justice and Development Party (AKP), while retaining its primary position in parliament, was deprived of the ability to form a single-party government, which it had been able to do after coming to power in 2002. Meanwhile the Kurdish-focused People’s Democratic Party (HDP) came in third position, before the Nationalist Movement Party (MHP). This was a shock for President Recep Tayyip Erdoğan, and it happened simultaneously with the first hints at independence from Iraqi Kurds and the efficient military performance of the Syrian Kurds of the People’s Protection Units (YPG) in battles against the Islamic State.

Second, this new situation triggered the formation of an AKP-MHP alliance and the interruption of the peace process with the Kurdistan Workers Party (PKK), which Ankara had launched three years earlier. Like the United States and the European Union, Turkey considers the PKK a terrorist organization. Predictably, the nationalists in the MHP pushed for an even harder line in the government’s policies toward the Turkish Kurds.

Against this background, the military alliance forged in Syria between the United States and the YPG, which Ankara regards as intimately tied to the PKK, was viewed by the Turkish government as a hostile move. The YPG captured territory from the Islamic State in an area spanning the Euphrates River in the west to the Tigris River in the east to the Iraqi border at Albukamal in the south. Crucially, U.S. support for the YPG was never accepted by Turkey. Despite Ankara’s hopes to the contrary, the Trump administration even increased its support for the YPG.

After a year of virtual silence about its Syria strategy, the administration came up with a policy on January 17, stating that U.S. forces would remain in northeastern Syria to finish the campaign against the Islamic State. This strategy was reaffirmed by President Donald Trump in Davos on January 26. During his first year, Trump allowed his military to run operations in northern Syria, leaving a deficit of diplomatic contacts with Turkey. Washington’s recent announcement that it would establish a 30,000-strong Border Protection Force in Syria, over which the YPG would have major influence, left serious doubts in the mind of Turkey’s leadership about Washington’s sincerity. The Americans corrected themselves a few days later, but it had little impact in calming Turkish fears.

The Turkish operation, which began on January 20 with a Russian green light for combat missions by the Turkish Air Force, has stretched along the 150-kilometer YPG-controlled border between Afrin and Turkey. It does not affect U.S. troops, since there are none in the vicinity. By contrast, there is a substantial presence of U.S. special forces in the 450-kilometer stretch of land between the Euphrates and Tigris Rivers. This includes a small pocket in the city of Manbij, located on the western shore of the Euphrates, where the U.S. had seemingly promised Ankara that the YPG would never set foot. Manbij is precisely where the Turkish leadership has announced it will intervene next to finish clearing its border of YPG forces.

Should this strategy be implemented, there would be a serious risk of conflict between Turkish and U.S. troops, and Washington’s strategy in Syria would then be vastly more complicated to implement. The Turkish deluge of criticism against Washington has reached new heights, with the publication of a pro-government op-ed titled “The U.S. is the enemy for Turkey,” a head-spinning patchwork of all conspiracy theories ever entertained in Turkey about the United States.

Moreover, the Afrin campaign—assuming that YPG forces are driven out of this westernmost Kurdish district and evacuated east of the Euphrates—can only be a temporary solution. Ultimately, the Assad regime aims to regain control of Syria’s borders. Oddly, this could be achieved by an indirect agreement with Turkey, through Russian mediation, but one cannot exclude that Damascus may prefer to broker a different agreement with the Syrian Kurds. Despite the media hype in Turkey, complete pacification of Afrin is still some time away.

Together with the much-touted (and yet to be implemented) sale of S400 missiles by Russia to Turkey, the ultimate outcome of the Afrin campaign and the eventual complications between the U.S. and Turkey in the eastern part of Syria will contribute to Moscow’s “success” in Syria. The fluctuations of Erdoğan’s policy in the country may ultimately serve Russian President Vladimir Putin well by pitting NATO’s two largest conventional armies against one another. Not surprisingly, the NATO alliance is uneasy.

In the final analysis, one is compelled to return to Turkish domestic politics. Despite the terrorism risk abundantly highlighted by Ankara, the Afrin operation is also an electoral gambit by Erdoğan. It is notable, for example, that the Turks never engaged in a diplomatic process with the Syrian Kurds, through U.S. mediation. Rather, by ramping up the nationalist rhetoric, the Turkish leadership is keeping the AKP-MHP alliance ahead of the pack. The main opposition party, the Republican People’s Party, as well as Turkey’s main business organizations, and the Armenian and Greek Orthodox religious authorities, have all declared support for the Afrin operation. Meanwhile, over 300 people who opposed the military campaign on social media have been detained. All politics are indeed local.

The next questions in Syria are more fundamental: How far will Erdoğan want to openly challenge the policies of the United States, and how strongly will Trump want to defend U.S. national security interests against Iran and Russia? The answers will have major consequences for Syria, and perhaps even for the NATO alliance.