When President Trump announced his decision to pull troops from northern Syria, his critics immediately warned that the move would pave the way for a Turkish offensive with potentially catastrophic repercussions.

State Department officials swiftly denied that Trump supported the Turkish incursion. Meanwhile, Trump appeared convinced he had made the right choice.

“Turkey, Europe, Syria, Iran, Iraq, Russia and the Kurds will now have to figure the situation out,” Trump wrote.

They now indeed are, but not to the advantage of the United States.

“What’s clear is that the U.S. has shot itself into the foot,” said Ali Fathollah-Nejad, a visiting fellow at the Brookings Doha Center.

Who are likely winners?

The U.S. pullout has enabled Turkey to pursue its military incursion without having to fear U.S. interference, but it has also created opportunities for four of the United States’ key foes: Iran, the Assad regime, Russia and — potentially — the Islamic State group.

Who is set to lose most?

The biggest losers — it appears at this stage — are the allies who fought alongside U.S. soldiers in Syria: Europe and the Kurdish-led Syrian Democratic Forces (SDF).

The former are afraid the move will free Islamic State prisoners held in Kurdish prisons and camps and expose Europe to new militant attacks after a period of relative calm. The latter had established a de facto state in the north of Syria during the past years — in large parts in places previously ruled by the Islamic State. The Kurds hoped their territory was somewhat protected by a U.S. military presence that acted as a deterrent.

How did we get to this point?

Turkish President Recep Tayyip Erdogan has long viewed the Kurdish-held territory in Syria as a haven for the Kurdistan Workers’ Party, or PKK — which Erdogan considers to be a terrorist group.

Meanwhile, to the south of the Kurdish-held territories, Russia and Iran-backed Syrian President Bashar al-Assad have been waiting for an opportunity to seize back the cities and swaths of land he lost during the war.

Trump’s announcement of a pullout one week ago offered an opening for both Erdogan and Assad. On Wednesday, Turkish troops began their offensive at multiple points along the Turkish-Syrian border. Turkish artillery fire on the Kurds, a mass exodus of civilians and apparent footage of roadside executions of Kurdish fighters soon followed. Hundreds of Islamic State family members escaped detention, according to Kurdish officials.

Without U.S. backing and amid mounting chaos, the Kurds appeared to face the choice between a deadly confrontation with the militarily superior Turkish forces — or a deal with the Assad regime.

By Sunday, the SDF had opted for the second option: They announced a deal with the Syrian government to allow forces loyal to the regime to enter its territory. By Monday, Syrian government troops were raising flags in the towns close to the Turkish-Syrian border in a move that could make the presence of the remaining U.S. troops in the region unsustainable.

How do the Assad regime, Russia and Iran benefit?

With the United States voluntarily giving up much of its leverage in Syria, Russia has probably the most to gain. Throughout the Syrian civil war, Russia has staunchly supported the Assad regime. During the weekend, the New York Times revealed that the Russian Air Force deliberately and repeatedly bombed Syrian hospitals in rebel-held areas, indicating how far Russia is willing to go to support Assad.

But apart from military force, Russian President Vladimir Putin has also pushed ahead with diplomatic initiatives, positioning him at the center of the Syrian morass. The U.S. pullout expands the Russian leverage in at least two ways.

Firstly, the strengthening of the Assad regime would inevitably also bolster Russia, a key backer.

But ironically, it could also help to deepen Moscow’s ties to the country Assad’s forces may now face off in northern Syria: Turkey. With the United States potentially poised to impose sanctions on Turkey, as Trump indicated Monday, Russia’s rapprochement with Turkey could speed up — despite the countries’ differing interests in Syria.

From Russia’s perspective, this apparent contradiction may not seem so contradictory at all. In the past, Moscow has argued that SDF fighters should yield control to the Assad regime. The Turkish incursion and U.S. pullout may lead to exactly such a scenario, as Sunday’s deal between the SDF and the Assad regime appeared to suggest.

The developments of the past week may also be an opportunity for Iran, another backer of the Assad regime. The U.S. pullout, said Brookings researcher Fathollah-Nejad, “will expand Iran’s opportunities to engage with Kurds and portray itself as the only reliable partner.” This could help Tehran restrict the Kurds’ drive for empowerment, which Iran opposes.

But Fathollah-Nejad cautioned that Russia’s and Iran’s interests in Syria were not necessarily aligned and that the Turkish incursion may still end up becoming a “double-edged sword” for Iran, which explains why Iranian officials have officially condemned the Turkish offensive.

Iranian officials may fear a radicalization of Kurdish separatism, said Fathollah-Nejad, and a full-blown resurgence of the Islamic State.

How does Islamic State gain?

Amid the backlash against his decision to pull U.S. troops out of northern Syria, Trump went on the offensive last week and blamed European countries for what he suggested was a lack of willingness to take back Islamic State fighters born in Europe and held by the Syrian Kurds.

“Europe had a chance to get their ISIS prisoners, but didn’t want the cost,” Trump reiterated on Monday.

European officials have rejected Trump’s criticism, arguing that Islamic State returnees would in many cases walk free in Europe, as authorities often lack evidence for crimes committed in Syria or Iraq. Despite fierce criticism from human rights advocates, major European governments have opted to leave Islamic State fighters in Kurdish detention.

The U.S. pullout has resulted in an outcome detrimental both to U.S. counterterrorism officials and their European counterparts. Some 785 people affiliated with the Islamic State escaped from a camp on Sunday, according to Kurdish officials.

Apart from the escape of former Islamic State fighters or supporters, European officials worry the chaos of renewed widespread military conflict in that part of Syria could provide the Islamic State group with an opening to conduct new attacks and rebuild its organization.

Read more: