Feeling betrayed by the United States, its Kurdish allies in Syria asked the Syrian government on Friday to protect them from possible attack by Turkey.

The request surprised some American officials and could help open the way for the forces of President Bashar al-Assad of Syria, backed by Russia and Iran, to start retaking the Kurdish-held part of the country near Turkey’s border.

That would be a big step toward Mr. Assad’s goal of reclaiming all of Syria, upended by almost eight years of war.

It was also the first sign that President Trump’s abrupt announcement last week that he was withdrawing American troops from Syria was not only shifting alliances in the conflict but directly benefiting Mr. Assad — a brutal autocrat once described by Mr. Trump as an “animal” responsible for chemical attacks and other atrocities.

American-backed Kurdish People’s Protection Units, or Y.P.G., said the Syrian government should send troops to the city of Manbij, near the Turkish border.

The request amounted to a United States ally calling on an enemy of the United States to protect it from another American ally, Turkey.

The Kurdish militias are regarded by Turkey as dangerous, autonomy-minded insurgents. The United States regards them as valuable partners in helping rout Islamic State extremists from Syria — the original purpose of the American military deployment four years ago.

Although the American troops in Syria number only about 2,000, they have been a deterrent to an assault on the Kurdish militias by the Turks. The American presence also discouraged Mr. Assad’s forces from sweeping into the area even as they retook major areas elsewhere from anti-government fighters, often with the support of Russia and Iran.

With the request for help on Friday, the Kurds invited Mr. Assad into at least some of those areas that he had coveted.

Some American officials were taken aback by the Kurdish announcement, voicing frustration and anger to their Kurdish counterparts, according to a senior American official. There was no consultation or coordination, the official said.

While the United States understands the Kurdish motivation to open discussions with the Assad government, the official said, the Kurdish position did not necessarily reflect views of Arab members of the Kurdish-Arab coalition fighting the Islamic State in eastern Syria, and said it amounted to a unilateral bargaining gambit.

The Kurdish-led militias control about one-quarter of Syria’s territory, including valuable agricultural land and oil reserves in the north and east of the country.

Kurdish control is opposed not only by the Turks, but also by the government of Mr. Assad as well as its Russian and Iranian backers, who want the territory to fall back under the control of Damascus.

Mr. Trump’s surprise announcement that he would pull American troops had raised fears of a scramble by competing forces to exploit the resulting vacuum.

Through their alliance with the United States, Syria’s Kurds gained unprecedented military and political power during the war. As Islamic State fighters were pushed back, the Kurds often filled the political gap left behind, establishing councils to run local affairs.

But aware that the United States could eventually withdraw, they also began talks with the Syrian government about reconciling.

Abdulkarim Omar, a foreign relations official with the Kurdish-led administration in northeastern Syria, said by phone on Friday that the talks continued and that the only issue that had been agreed upon so far was the Syrian Army deployment near Manbij, after the Americans withdraw.

When asked if that agreement had been coordinated with the United States, he said, “You can ask the Americans.”

But much remains uncertain for the Syrians living in those areas, especially since the two parties to the agreement described it in different ways. The Kurds said that the Syrian Army would take over only border areas to protect against a Turkish attack, but not deploy inside Manbij itself.

The areas run by the Kurds in Syria have long stood apart in the conflict. They had hoped, with their American friends, to pioneer an alternative model for Syria’s future.

While none of the other powers fighting in Syria liked the situation, they mostly avoided attacking the area for fear of provoking the United States. Now, with that deterrent set to end, the future of the northeast is up in the air.

Those most likely to gain, analysts say, are the Syrian government and its allies, who want to bring the northeast back under the control of Damascus, both for the good of Mr. Assad and for their own interests.

Russia would like to see Mr. Assad regain control of Syria’s oil reserves to help finance the country’s reconstruction, while Iran wants to geographically connect forces it supports in Syria and Lebanon with those in Iraq.

“An American withdrawal from Syria is the equivalent of handing Syria on a silver plate to Iran and its militias,” said Muhannad al-Talaa, the commander of an Arab militia near the United States military base at al-Tanf, near the Iraqi border. “If the U.S. withdraws and we are forced to leave, Iran will have a steady supplies route through Iraq to its militias and Hezbollah in Syria.”

A swift American withdrawal could also benefit the remnants of the Islamic State. While the organization has lost nearly all of the territory it once held, experts estimate that it still has thousands of fighters who have returned to their insurgent roots and can still mount attacks.

If the local forces fighting the jihadists lose their American battlefield commanders, they would be forced to rely on the small cadre of British and French forces still in Syria, which could cause confusion, experts say.

Although President Trump initially lobbied to pull American troops out in 30 days, the Pentagon has pushed for a withdrawal that could take months, citing the danger to American forces if ordered to dismantle their outposts quickly.

It is also possible that the Pentagon will allow Kurdish militia fighters to keep at least some of their American-supplied weapons, a United States defense official said, despite assurances to Turkey last year that the armaments would be repossessed when combat operations concluded.

But it is unclear how American forces will continue to support their local allies on the ground, although the Pentagon has proposed a number of strategies that include keeping Special Operations troops in Iraq that can launch missions into Syria, something President Trump hinted at during his visit to Iraq Wednesday.

That may be necessary, as many doubt the ability of the Syrian government and its allies to see the battle against the Islamic State through to the end.

“I don’t think the regime and its militias can handle that issue very well given how much the United States has struggled with it,” said Faysal Itani, a senior fellow at the Atlantic Council who studies Syria.

The biggest losers in an American withdrawal will be the local forces who found themselves empowered by their partnership with the United States. They included Arab militias that oppose the Syrian government and did not want to live under its rule.

“The Americans stabbed us in the back,” said Mohammed Jabr, a member of the military council in Deir al-Zour in eastern Syria. “They played with us.”

But topping the list of America’s aggrieved allies in Syria are the Kurdish forces who served as the primary fighting partners against the Islamic State.

The Kurds’ alliance with the United States turned them from a marginalized minority into power brokers for a large part of the country. But without the United States, they will find themselves between the Syrian government, which wants them back under the control of Damascus, and Turkey, which wants them destroyed.

“I think they really have only one choice, which is to accept what Assad offers, and he is not going to be altruistic,” said Randa Slim, a senior fellow at the Middle East Institute. “He is going to try to get the Kurds to accept whatever maximalist demands he can offer.”