Erdogan will undoubtedly spin the US withdrawal as a personal victory as he campaigns for nationwide municipal elections that are due to be held in March.

With US military personnel reportedly slated to leave within three months (the evacuation of US civilians has already begun), it remains unclear what sort of security arrangements the Americans will leave in place. What will become of the Kurdish and Arab Syrian Democratic Forces, the 60,000-strong YPG-led force that led the coalition’s ground war against the Islamic State? And most critically for Ankara, what will departing US special forces do about the weapons given to the YPG?

Turkey's threats to attack the Syrian Kurdish People’s Protection Units (YPG) east of the Euphrates River, where US forces are based, were calculated to get the Pentagon to scotch its alliance with the Kurds, not for US forces to leave en masse and certainly not so quickly. Rather, Turkey wanted the US-led coalition to preside over the insertion of its own Arab proxies, particularly in Arab-majority towns such as Raqqa, Tell Abyad and Manbij, at the expense of the YPG and its Arab partners.

Amid all the self-congratulatory chest-thumping, the haste with which Trump appears to be dumping the United States’ Syrian Kurdish allies is not necessarily what Turkey’s president, Recep Tayyip Erdogan, had banked on.

As President Donald Trump’s bombshell decision to withdraw all US forces from Syria begins to sink in, for Ankara, the adage “be careful what you wish for, you might get it” may well be flitting through official minds.

“This was Trump’s New Year’s gift to Erdogan,” Zubeyir Aydar, a member of the executive board of the Brussels-based Kurdistan National Congress, told Al-Monitor. “We never asked America to choose between Turkey and the Kurds but to bring them together at the negotiating table. America has betrayed the Kurds once again.”

Once the Americans are gone, however, Turkey will be left to reckon with Russia, Iran, the regime — and the Kurds — alone. Ankara’s talk of a “US-backed Zionist plot” to birth a Kurdish entity in Syria that would gobble up chunks of Turkey will become harder to peddle.

The YPG is accusing the Americans of abandoning it to the jaws of its Turkish predators. As soon as the US forces leave, the Turks will come after them with their Sunni Arab proxies, hinted Turkey’s defense minister, Hulusi Akar, in no uncertain terms today. Akar vowed that “when the time comes,” Turkey would “bury the terrorists in the trenches they dug” regardless of “how deep they descend into the bowels of the earth.”

But will that time actually come? It’s clearly not in Turkey’s interest to move against the Kurds when Ankara is hoping to extract as much as possible out of the Americans while they are still around. Morever, doing so now would be to brook global censure that it’s “helping IS” because the YPG would abandon the ongoing fight against the jihadis to defend their own lands against Turkey. What Ankara does when the US forces finally leave will largely depend on the Russians, the only big power with boots on the ground.

Russia allowed Turkey to move against the YPG in Afrin in January 2018, culminating in the fall of the Kurdish-dominated enclave in March. But that was when it wanted to drive a wedge between the Kurds, the Turks and the Americans and to secure Turkey’s cooperation against al-Qaeda linked Hayat Tahrir al-Sham (HTS) militants entrenched in Idlib. Some argue that Russian backing of Turkey was also designed to curb Iran.

But Trump’s decision to leave has reshuffled the deck. Turkey is no longer as useful a lever against the Americans. Moscow’s undeclared deadline for Ankara to deliver on its Astana commitment to defang HTS may have just grown tighter. Pressure for Turkey to relinquish its Syrian equities will grow.

Ilham Ahmed, the co-chair of the YPG-friendly Syrian Democratic Council and one of Washington's top interlocutors there, is among a handful of Kurds who recognizes that Trump’s decision is probably irreversible. The Kurds would be better off rekindling old alliances than trying to change the president’s mind. And as they weigh renewed negotiations with the regime of President Bashar al-Assad, “Arrows point to Moscow,” she said.

Until recently, Russia appeared to block putative stabs at cooperation between Damascus and the Kurds because it wanted to keep Turkey happy, and on Washington’s back. But the new dynamics will likely alter its calculations and the YPG has some chips to trade.

The YPG could, for example, swap oil fields in Deir ez-Zor, infrastructure such as Iraqi border crossings, the Tabqa Dam and Arab majority cities such as Raqqa for a Russia veto on a Turkish invasion. Similarly, it could hand over control of border crossings to regime forces, withdraw artillery and heavy weapons from the border but keep light ones to defend critical border towns such as Kobani against Turkey. But the YPG will need to act fast and seal an agreement while US forces are still around.

Some speculate that Assad is ready to revert to his late father’s ways of weaponizing the Kurds against Turkey without giving them anything in return. It’s far from clear that the Kurds would go for it or that the strategy, which relied on moving Kurdish fighters into Turkey through Iraq, could still work.

Besides, Turkey could decide to cut its own deal with the regime. The idea will have surely been floated during Erdogan’s meeting with Assad’s top ally, Iranian President Hassan Rouhani, in Ankara today.

“Iran will likely try to tie Assad’s hands when it comes to giving the Kurds anything,” Ahmed predicted. This is because “like Turkey,” Iran is afraid that any concessions from Damascus would sharpen similar demands among Iran’s own restive Kurds.

But all such scenarios rest on the benign assumption that the 7-year-old Syrian conflict is winding down. With the United States’ exit, it may be on the cusp of an even more intractable and bloodier phase.