BEIRUT — The blow to America’s standing in the Middle East was sudden and unexpectedly swift. Within the space of a few hours, advances by Turkish troops in Syria this week had compelled the U.S. military’s Syrian Kurdish allies to switch sides, unraveled years of U.S. Syria policy and recalibrated the balance of power in the Middle East.

As Russian and Syrian troops roll into vacated towns and U.S. bases, the winners are counting the spoils.

The withdrawal delivered a huge victory to Syrian President Bashar al-Assad, who won back control of an area roughly amounting to a third of the country almost overnight. It affirmed Moscow as the arbiter of Syria’s fate and the rising power in the Middle East. It sent another signal to Iran that Washington has no appetite for the kind of confrontation that its rhetoric suggests and that Iran’s expanded influence in Syria is now likely to go unchallenged.

It sent a message to the wider world that the United States is in the process of a disengagement that could resonate beyond the Middle East, said Hussein Ibish of the Arab Gulf States Institute in Washington.

“There’s a sense that the long goodbye has begun and that the long goodbye from the Middle East could become a long goodbye from Asia and everywhere else,” he said.

Images shared on social media underscored the indignity of the retreat. Departing U.S. troops in sophisticated armored vehicles passed Syrian army soldiers riding in open-top trucks on a desert highway. An embedded Russian journalist took selfies on the abandoned U.S. base in Manbij, where U.S. forces had fought alongside their Kurdish allies to drive out the Islamic State in 2015. 

“Only yesterday they were here, and now we are here,” said the journalist, panning the camera around the intact infrastructure, including a radio tower and a button-powered traffic-control gate that he showed was still functioning. 

“Let’s see how they lived and what they ate,” he said, before ducking into one of the tents and filming the soldiers’ discarded snacks. 

On Arab news channels, coverage switched from footage of jubilant Syrian troops to scenes of Russian President Vladimir Putin’s lavish receptions by the monarchs of Saudi Arabia and the United Arab Emirates, Washington’s most vital Arab allies in the Persian Gulf. The visits had been long planned, but the timing gave them the feel of a victory lap.

“This has left a bad taste for all of America’s friends and allies in the region, not only among the Kurds,” said a former regional minister who spoke on the condition of anonymity in order to not embarrass his government, an American ally. “Many will now be looking for new friends. The Russians don’t abandon their allies. They fight for them. And so do the Iranians.”

It was the manner of the withdrawal, hastily called amid chaos on the battlefield as Turkish forces pushed deep into Syria, that gave the event such impact in the region, analysts said. Few had anticipated that the most advanced military in the world would make such a scrambled and hasty departure, even after President Trump signaled he would not endorse a war on behalf of the Kurds against a U.S. NATO ally.

Less than 48 hours before the withdrawal announcement, U.S. Gen. Mark A. Milley, chairman of the Joint Chiefs of Staff, had given assurances that the troops would remain indefinitely, standing by their Kurdish partners to continue to hunt down the Islamic State.

 But the Turks’ capture Sunday of a key highway that served as the U.S. troops’ main supply line revealed the fragility of a mission that had narrowly focused on the Islamic State fight while neglecting regional dynamics, including the depth of Turkish animosity to the Kurdish militia with which the United States had teamed up.

For many in the region, Trump’s abandonment of Syria caps a long erosion of trust that began under the administration of President Barack Obama. His decision not to stand by Egyptian President Hosni Mubarak, who was toppled during the Arab Spring uprisings in 2011, is frequently contrasted with Russia’s unwavering support for Assad after he faced popular unrest just a few weeks later, Arab officials say. 

Obama’s retreat from his “red line” ultimatum on the use of chemical weapons by the Syrian government, after hundreds died in an attack outside Damascus in 2013, further called into question Washington’s credibility, they say. His nuclear deal with Iran, which eased economic sanctions in return for restrictions on its nuclear activities, was seen by some as a capitulation to Iran and a betrayal of U.S. allies in the Middle East who were not consulted and were more concerned about Iran’s pursuit of ballistic missiles and regional expansionism.

Trump’s election to the presidency was welcomed by the United States’ closest allies as a chance to reset the clock, but he, too, has disappointed, with his unpredictability and seemingly erratic decision-making. His decision not to confront Iran after it shot down an American drone in June jolted Gulf Arab leaders, who began to wonder whether decades of U.S. security guarantees could be counted on in the event of a real crisis with Iran.

Americans cannot complain about any loss of influence in the region as a result of their actions, said Mohammed al-Sulami, writing in the Saudi Arabian Arab News outlet on Wednesday. 

“Washington actively opted for this policy, having chosen a strategy of withdrawal and retrenchment,” he wrote. “The U.S. has no right to condemn the region’s countries if they choose to forge relations with other powers to protect their interests.” 

The abrupt departure from northeastern Syria, Ibish said, has further shredded any U.S. credibility that had survived the disengagement of the Obama era and the capriciousness of the Trump one. The United States remains overwhelmingly the dominant military power in the Middle East, with around 50,000 troops deployed in the region and a level of technological superiority that will ensure allies covet American weapons and support for years.

But friends and enemies alike are starting to suspect that Trump’s unpredictability is less a cause than a consequence of a broader American reluctance to engage with the world, Ibish said. He dates that to the trauma of the bloody, costly and ultimately unsatisfying wars in Iraq and Afghanistan.

“People are asking: Could the United States not only be an unreliable power, but could it actually be a weak power as well?” he said. “Not because it lacks the capability but because it lacks the will.”

There was therefore a sense of inevitability to the sudden American departure from Syria, analysts said. Washington appears to have underestimated Turkey’s determination to prevent the emergence of a Kurdish statelet on its border and overestimated the limited leverage offered by the presence of 1,000 U.S. troops.

The small U.S. presence in Syria had big intentions but only limited means. The goal, as articulated by State Department officials, was for the troops to remain there to stamp out the remnants of the Islamic State and to provide leverage in seeking a Syrian peace settlement that would impose restraints on Assad’s power, safeguard Kurdish interests and limit Iran’s influence. 

The Kurds also had overestimated their clout with an American president who frequently asserts his determination to disentangle the United States from Middle East wars, said Hilal Khashan, professor of political science at the American University of Beirut.

“The Kurds got carried away with their expectations and believed the U.S. would behave differently to all the foreign powers over the past 150 years,” he said. “They discovered that the U.S. was no different.”