ANKARA/BEIRUT (Reuters) - President Donald Trump’s decision to pull out of Syria radically realigns the balance of power in the country’s northeast and creates a vacuum which Russia, Turkey and Iran are racing to fill.

With Turkish forces pressing south from the border, the Kurds have invited troops from Syrian President Bashar al-Assad’s Russian-backed government in from the south and the west. Assad’s forces are exploiting the U.S. retreat to seize back resource-rich territory they abandoned years ago.

The area includes most of the Syrian lands that formed the “caliphate” of the Islamic State group, whose fighters have gone underground but vowed to stage a comeback.

More than 10,000 Islamic State prisoners, including many hardened foreign jihadis whose Western governments refuse to take them back, are in prisons there, and tens of thousands of their family members are in camps.

Here is a summary of what the U.S. withdrawal means for those rushing in and those left behind.

WHAT IS THE AIM OF TURKEY’S OFFENSIVE?

Turkish President Tayyip Erdogan says he wants to settle up to two million Syrian refugees, many of them of them Sunni Arabs, into the region targeted in the operation, territory which is currently controlled by Kurdish-led forces.

Turkish troops and Ankara-backed Syrian rebels have focused in the first week of operations on driving Syrian Kurdish YPG fighters from two major border towns, Tel Abyad and Ras al Ain, about 120 km (75 miles) apart.

Despite a chorus of global criticism, Erdogan has said nothing will stop operations against Kurdish YPG fighters, considered terrorists by Ankara because of their links to guerrillas waging an insurgency in southeast Turkey.

Erdogan has said Turkey will seize a border strip running hundreds of km (miles) from Kobani in the west to Hasaka in the east and 30-35 km (18 to 22 miles) deep inside Syria.

A Turkish official told Reuters the operation was proceeding “quite rapidly and successfully”. The first phase would be complete by Nov. 13, when Erdogan is due to meet Trump during a visit to Washington, he said, without specifying how far Turkey would have gone by then.

Slideshow ( 5 images )

WHAT ARE ASSAD’S GOALS?

The full withdrawal of U.S. forces and deployment of the Syrian army is a major juncture in the Syrian conflict, restoring a foothold for Assad’s government across the biggest swath of the country that had been outside its grasp.

The area includes oil, farmland, water resources and the hydro-electric dam at Tabqa - vital assets that will better position the government to cope with the impact of Western sanctions.

Syrian state media have said troops have reached the M4 highway that runs east-west around 30 km (18 miles) south of the frontier with Turkey, on the edge of Ankara’s planned “safe zone”. On Tuesday they entered Manbij, in an area that had been patrolled jointly by Turkey and the United States.

Assad’s army, however, has been weakened by the attrition of prolonged conflict, and now relies heavily on Russia, Iran and Iran’s Shi’ite militia allies including Lebanon’s Hezbollah.

WHAT DOES IT MEAN FOR KURDISH AUTONOMY?

Syria’s Kurdish groups exploited the withdrawal of government forces from the northeast at the start of the Syrian conflict to build up the institutions of autonomy and teach Kurdish language in local schools.

Exposed to Turkish attack by the U.S. withdrawal, they invited the Syrian army back - a decision that highlighted their weakness and signaled an end to many of their dreams.

They will hope to preserve as much of their autonomy as possible in political talks with the Syrian state - their long declared objective. But they no longer have a powerful ally to back them.

Still, Damascus and the SDF share the objective of driving Turkey from northern Syria, or at least halting its advance.

Slideshow ( 5 images )

“Damascus needs the Kurds. The Kurds and Damascus have two things in common: enmity for Turkey and a desire not to see Sunni rebel militias ruling the northeast of Syria,” said Joshua Landis, head of the Center for Middle East Studies at the University of Oklahoma.

“But they don’t agree on anything when it comes to ruling northeast Syria.”

WHAT WILL BECOME OF ISLAMIC STATE?

The Kurdish-led SDF was the main force on the ground in the U.S.-backed offensive that recaptured the Syrian lands of Islamic State’s self-proclaimed caliphate, including the group’s de facto capital Raqqa. Before its pullout, Washington had been preparing to train and equip an SDF force to stabilize the area, to prevent a return by the militants, who carried out large massacres of Kurds in towns they had controlled.

The SDF says the Turkish offensive has helped energize Islamic State sleeper cells, just a year after the “caliphate” was effectively dismantled. Islamic State has already claimed responsibility for attacks, including a deadly car bomb strike outside a restaurant in the biggest Kurdish city Qamishli just a day after Turkey launched its incursion.

Since the fighting started last week, the SDF says there has also been unrest in the prisons where they are holding the fighters, and in camps holding their wives and children.

POTENTIAL IRANIAN WIN

Assad’s ally Iran is also set to gain. Iraqi paramilitary groups backed by Iran on the Iraq-Syria border will likely help Assad secure control, strengthening their own supply lines along a corridor of territory from Tehran to Beirut.

WHAT DOES RUSSIA WANT?

Russia’s indispensable role in Syria reflects a larger shift in the Middle East from Damascus to Riyadh, as showcased by President Vladimir Putin’s Gulf tour this week, including his first visit to Saudi Arabia in more than a decade.

It was Russia’s intervention with air power in 2015 which helped turn the tide of Syria’s civil war in Assad’s favor, and Trump’s decision to pull out of the northeast has cemented Moscow’s central role in shaping the country’s future.

“There are Turkish-Russian talks ... to set the tempo for northern Syria, particularly east of the Euphrates,” said a regional pro-Damascus source. “They are the ones moving all these plans.”

The Turkish official said Ankara is “working in very close cooperation with Russia”, and Erdogan pointed on Monday to Russia’s importance when he said that President Vladimir Putin had shown a “positive approach” to the situation.

The two countries may be able to forge an agreement dividing the northern border into new control zones and prevent their local allies - the Syrian government on the one hand and anti-Assad insurgents on the other - from going to war.

“I think there will be real friction but I do think the Russians will be able to manage it. There is a deal to be made,” said Joshua Landis, an expert on Syria and head of the Center for Middle East Studies at the University of Oklahoma.