Aleppo has been part of human history for some five thousand years. Abraham is said to have grazed his sheep on its slopes and donated their milk to the local poor. Alexander the Great founded a Hellenic settlement there. The city is cited in the Book of Samuel and Psalm 60, and for centuries its residents reflected the three great Abrahamic faiths. It was at one end of the ancient Silk Road, and a major metropolis in the many empires that conquered and ruled the region. Its medieval Citadel, pivotal during the Crusades, is one of the world’s oldest and largest castles. More recently, Shakespeare referred to Aleppo in both “Macbeth” and “Othello.”

The Battle of Aleppo, which since 2012 has pitted the despotic government of President Bashar al-Assad against an array of disorganized opposition rebels, now appears to be over. A deal to allow the safe passage of the last opposition fighters, their families, and any civilians who want to leave—an end to the agony—was brokered Tuesday by Russia and Turkey. “All militants, together with members of their family and the injured, currently are going through agreed corridors in directions that they have chosen themselves voluntarily,” Russian Ambassador Vitaly Churkin told the U.N. Security Council.

The United States was not party to the deal, a State Department official told me. “We would welcome a ceasefire,” he said. “But we’re not sure about Russian intentions. Historically, they don’t always mean what they say.”

Much of the famed city, the largest in Syria, has already been destroyed. The Old City has been gutted. The destruction has been compared to that at Stalingrad and in the Warsaw Ghetto. In a crescendo of cruel air strikes, which have escalated since the summer, eastern Aleppo fell this week to the government forces holding the city’s western half.

The savagery had become primordial. On Monday, U.N. Secretary-General Ban Ki-moon expressed alarm over reports of dozens of summary executions by government forces, hundreds of “missing” men, and atrocities against women and children during the final military push. At a special session of the U.N. Security Council on the Aleppo crisis, on Tuesday, France’s U.N. Ambassador, François Delattre, said, “The worst humanitarian tragedy of the twenty-first century is unfolding before our eyes.” The International Red Cross warned of a “human catastrophe” as Aleppo plunged into chaos. “Every hour, butcheries are carried out,” the Syrian Observatory for Human Rights reported. On Tuesday, it said that some six thousand boys and men had been detained after fleeing rebel-held areas.

The fall of Aleppo is the biggest victory for Assad in the grisly six-year war, which has killed more than four hundred thousand people and left more than half of Syria’s population, originally twenty-two million, dependent on international aid for daily survival. The odds were always against the rebel groups, which were outnumbered and outgunned by a government with airpower—and Russian, Iranian, and Lebanese Shiite forces to back it up. In the final days in the east, they basically collapsed.

“They don’t have much time. They either have to surrender or die,” Syrian Lieutenant General Zaid al-Saleh told reporters on Monday, as he toured part of the recaptured city. Bedraggled civilians—long under siege and without hospitals, since the last one was bombed this fall—fled eastern Aleppo in droves.

The Assad dynasty’s conquest of Aleppo is a boon to the Russians, who covet Syria as their prime Arab ally—and for its Mediterranean port. Moscow may be gaming the Presidential transition in the United States, U.S. officials told me. It is trying to insure that Assad regains control over as much Syrian territory as possible before President-elect Donald Trump is inaugurated—to present the survival of the regime as a fait accompli. Iran and its Hezbollah allies are winners, too, albeit at a cost.

The loss of Aleppo is, in turn, a huge setback for the West, Turkey, and the Gulf monarchies, which supported several rebel factions with arms, training, or funds. For two years, Secretary of State John Kerry has been trying to broker a political transition that would include both the government and the opposition. As that effort imploded, he repeatedly met with his Russian counterpart, Sergey Lavrov, right up until last week, in Hamburg—in an attempt to negotiate a ceasefire that would allow the rebels and civilians a peaceful exit to a place of their choice. In the end, Russia managed to make a deal that excluded the United States.

The deepening tension between Washington and Moscow over Aleppo was reflected in an exchange at the Security Council on Tuesday. U.S. Ambassador Samantha Power rebuked Assad, Russia, and Iran. “Your forces and proxies are carrying out these crimes,” she said. “Your barrel bombs and mortars and air strikes have allowed the militia in Aleppo to encircle tens of thousands of civilians in your ever-tightening noose. It is your noose. Three member states of the U.N. contributing to a noose around civilians. It should shame you. Instead, by all appearances, it is emboldening you. You are plotting your next assault. Are you truly incapable of shame? Is there literally nothing that can shame you? Is there no act of barbarism against civilians, no execution of a child that gets under your skin, that just creeps you out a little bit? Is there nothing you will not lie about or justify?”

Churkin, the Russian envoy, countered that it was “very strange” that Power issued a statement “as if she was Mother Teresa.” He added, “Please remember what country you are representing. Please remember your country’s track record, and then you can start opining from the position of any moral supremacy.”

Assad’s restored grip over Syria’s commercial hub—its New York—does not end the war. Far from it. The Syrian conflict has been increasingly multilayered. A variety of rebel groups—some nationalist, some local, some non-ideological, and some Islamist, including the most potent Al Qaeda branch, Jabhat Fateh al-Sham—still hold Idlib Province, in the northwest. Assad and his foreign backers are likely to try to win it back next. It may prove harder than Aleppo. Assad’s army surrounded Aleppo and cut off its roads to Turkey, which had allowed the rebels to resupply and rearm. It will be much more difficult to do that in Idlib, on the Turkish border. Turkey would have to reverse its longstanding opposition to Assad and turn its back on the rebels.

A separate war is playing out in the northeast, along the Iraq border, which has been occupied, since late 2013, by the Islamic State. Much of the fighting there pits ISIS against other Syrian rebels. ISIS has lost almost thirty per cent of its turf under pressure from the Syrian Democratic Forces, a Kurdish-heavy militia, backed by punishing U.S. airpower. ISIS fighters have fought Assad’s army in fewer places, such as Palmyra, in the central Syrian desert, which ISIS captured in May, 2015. The Syrian Army won it back in March. This weekend, though, ISIS proved that it can still surprise. As Assad’s army ground away at Aleppo, ISIS recaptured Palmyra. Damascus was stunned.

The conflict also shows no signs of ending, because it has sucked in other countries, causes, competing political visions, and sectarian tensions. The balance of power in the Middle East—notably between regional rivals Saudi Arabia and Iran, but dragging in others—is also at stake in Syria, a prime geo-strategic property. Riyadh has backed several Sunni rebels, while Tehran has supported the government, led by Alawites, a minority linked to Shiites. The tensions are not just over religious dogma; they are also about competing political visions and interests in the wider Middle East. Neither side is likely to give up, even when its allies are weakened.