The collapse of the Assad regime in Syria has set off a scramble for control of the heart of the Middle East, a competition that could defer indefinitely the peace and stability Syrians crave and potentially spill into a wider region already roiled by war.

In Syria’s first week without Bashar al-Assad, the longtime despot who has since fled to Moscow, three foreign powers bombed targets in the country in pursuit of their strategic goals: the United States against Islamic State remnants in the east, Turkey against Kurdish forces in the northeast and Israel against Syrian military assets in multiple locations.

Russia and Iran, Assad’s key supporters and the biggest losers from the change of power in Damascus, were meanwhile rushing to withdraw or reposition their forces in the country. Iran has evacuated 4,000 personnel from Syria since Assad’s fall, an Iranian government spokesman said. Russia has also been pulling troops from its bases around Syria, transporting them to the Hmeimim air base on Syria’s Mediterranean coast, although it remains unclear whether the relocations represent a full-scale withdrawal.

The activity is a measure of Syria’s vital strategic importance as a crossroads of religions, ideologies and terrain that borders five Middle Eastern nations. It also underscores the potential for upheaval as political and military alliances shift, and Islamist rebels, led by Hayat Tahrir al-Sham (HTS), seize control in Damascus.

For five decades, the Assad family ruled Syria as a staunchly anti-Western but secular dictatorship, allied first with the Soviet Union – then Russia – and with Shiite revolutionary Iran. The takeover last week by Sunni Muslim fighters, some of whom have drawn inspiration from al-Qaeda, radically changes the regional balance of power.

The east-west axis of influence that linked Tehran to Beirut through Iraq and Syria has been severed; the corridor of power now runs north to south, from Turkey through Syria into Jordan and the Sunni Arab nations of the Persian Gulf.

“Any way you spin it, this is a geopolitical earthquake of the greatest magnitude in the heart of the Middle East,” said Firas Maksad, a senior fellow with the Middle East Institute. “It’s a sea change.”

The region’s recent history of uprisings and coups contains ominous reminders of the potential for instability when a strongman is overthrown.

The toppling of Saddam Hussein’s Sunni regime in Iraq in 2003 empowered the country’s Shiite majority and triggered a Sunni insurgency that evolved into the Islamic State.

The overthrow of Libya’s Moammar Gaddafi in 2011 opened the door to a protracted civil war among rebel factions backed by foreign powers. In Egypt, a military coup ousted the democratically elected government led by the Muslim Brotherhood, restoring an authoritarian regime.

Syria’s civil war may yet continue if the victors seek to exact revenge, the rebels split and foreign powers try to muscle in.

“This is the big fear,” said Syrian journalist Ibrahim Hamidi, who lives in exile in London and is editor in chief of the Saudi Arabian-owned magazine Al-Majalla. “We are all happy Assad fell and fled. It was a miracle. But what’s ahead? There are a lot of challenges, tough questions ahead.”

How Iran decides to respond to the blow to its regional ambitions will be crucial to determining the fate of both Syria and the new Middle East. Tehran may decide to embark on fresh negotiations with the West over its nuclear program, or it could double down and seek to rebuild its shattered network of allied militias.

“We all know Iran lost big-time with the fall of Assad. We also know Iran has patience,” Hamidi said. “For now, it’s taking a few steps back to decide how to deal with this.”

The most immediate risk of violence lies in and around the Kurdish-controlled enclave in northeastern and eastern Syria, where around 900 U.S. troops are deployed alongside a Kurdish-led force that was established in part to fight the Islamic State. Turkey, which has fought a decades-long Kurdish insurgency at home, has long opposed the enclave in Syria. The ascendance of Turkish-backed Sunni rebels sets the stage for a new round of conflict between Arabs and Kurds that could draw Ankara deeper into Syria and ensnare U.S. forces.

This is also the main region where the Islamic State has attempted to regroup, compounding the danger of more fighting, which could make the U.S. presence there unsustainable, Charles Lister, senior fellow at the Middle East Institute, told a panel last week.

If the Kurds face a serious threat to their heartland in the far north of the country, their forces would likely pull back from many of the predominantly Arab areas they currently control, said Barzan Iso, a Kurdish journalist based in northeast Syria. “We fear Turkey more than HTS,” he said. Any Kurdish withdrawal would leave U.S. troops vulnerable in at least some of their bases and raise questions about the future of America’s anti-ISIS mission.

At the same time, Israel’s strikes on Syrian military infrastructure and weaponry risk alienating the newly empowered rebels. The groups had not previously focused on Israel as a threat, said Michael Horowitz, head of intelligence for Le Beck International, a Middle East security consultancy. Israel has also moved troops into – and beyond – a demilitarized buffer zone inside Syria, compounding Syrian suspicions of Israel’s intentions.

Israel is characterizing its actions as defensive, to ensure that whatever power emerges in Damascus will never be able to pose a conventional threat, Horowitz said. But in the process, “they’re turning the new Syria into an enemy on Day 1,” he said. And at the same time, they are depriving the new authorities in Damascus of the military means to confront whatever other challenges may emerge.

Syria’s Arab neighbours, which were in the process of normalizing relations with Assad when the rebels swept to power, are also watching the developments with a wary eye. In the first years of the Syrian uprising, Arab states rushed to support different factions among the loosely defined Free Syrian Army, contributing to the divisions that undermined the rebels’ earlier attempts to topple the regime. Their biggest concern, however, was the expanding influence of Iran, and they subsequently reconciled with Assad in the hope that they could persuade him to break with Tehran.

The Arab states will be relieved that Iran’s axis has been shattered, said Fawaz Gerges, professor of international relations at the London School of Economics. But they are also leery both of Islamists and the spread of democracy. If a new order emerges in Damascus that makes them uncomfortable, he said, they could try to influence Syria’s trajectory by sponsoring local clients.

Syria is a cauldron of competing ideologies and religions, spanning a spectrum from jihadists to moderate Islamists, secularists and democrats, and including significant Christian and Alawite minorities. All have different hopes and expectations for the future and could be vulnerable to foreign interference, Gerges said.

“It’s the internal dynamics that could really allow neighbouring countries to meddle in Syria’s external affairs and exacerbate problems,” he said. “Syria has long been a battlefield for proxy warfare, and I don’t think this has changed.”

Such is the enormity of the challenge of building a new Syria from the ashes of the destroyed country that “the risks and uncertainties outweigh any possibility or promise,” Gerges added. “The odds are against a smooth and peaceful transition.”

But there are also reasons to hope Syria will avoid the worst outcomes, said Hamidi. Syrians have already been fighting one another for the past 13 years, “and they are exhausted” he said. “And if they are aware of the risks, they can overcome them.”