BEIRUT — Syria’s military said Friday it had entered the key Kurdish-held city of Manbij in an apparent deal with the Kurds, who are looking for new allies and protection against a threatened Turkish offensive as U.S. troops prepare to leave Syria.

Turkey and American troops patrolling the town denied there was any change of forces in the contested area, contradicting the Syrians and highlighting the potential for chaos in the wake of last week’s surprise announcement by the United States that it was withdrawing its troops.

Since the U.S. announcement, forces have been building up around Manbij and farther east, ushering in new alliances and raising the chances for friction. The Kurds’ invitation to Syrian troops shows they’d rather let Syria’s Russian- and Iranian-backed government fill the void left by the Americans than face the prospect of being overwhelmed by their top rival Turkey.

Meanwhile, a flurry of meetings is expected in the coming days as all sides of the conflict scramble to find ways to replace the departing U.S. troops. They include one Saturday in Moscow, where Russia will host top Turkish officials in a possible sign that the two sides could be working on a deal to avert a Turkish offensive into Syria. Russians officials have said they expect Syrian government troops to replace the U.S. troops when they withdraw.

Turkey considers the U.S.-backed Kurdish People’s Protection Units, which now control nearly 30 percent of Syria, a terrorist group linked to an insurgency within its own borders. Kurdish-controlled Manbij has been at the center of rising tension between the U.S. and Turkey.

There were conflicting reports Friday on the location of the Syrian troops, who said they had moved into Manbij and raised the Syrian flag in the city. The Kurdish militia said it has invited the Syrian government to take control of Manbij to protect it against “a Turkish invasion.”

But a Kurdish official said the government deployment has so far been limited to the front line with Turkey-backed fighters, based north and west of Manbij. And U.S. officials in Washington said Syrian regime forces and some Russian forces had moved a bit closer to the city and were largely south or southwest of the city.

The U.S.-led coalition said the announcement that government troops had entered the city was “incorrect,” and called “on everyone to respect the integrity of Manbij and the safety of its citizens.”

Russia and Iran, meanwhile, welcomed the Syrian announcement. Kremlin spokesman Dmitry Peskov called it a “positive step” that could help stabilize the area.