BEIRUT — Syria’s military announced Friday that it entered the flashpoint Kurdish-held town of Manbij, where Turkey has threatened an offensive, and raised the national flag there.

A Syrian Kurdish official however said the government troops arrived only at the town's perimeter.

Turkey's president said the facts on the ground in Manbij remain uncertain, calling the government entering the town a "psychological act."

"I spoke with my friends, with intelligence, etc., about an hour ago and there is nothing certain at this moment," Recep Tayyip Erdogan told reporters in Istanbul.

The Kremlin, meanwhile, welcomed the Syrian military announcement. Spokesman Dmitry Peskov called it a "positive step" that could help stabilize the area.

There was no immediate comment from the U.S., whose troops have been patrolling the tense front line between Manbij and adjacent towns where Turkey-backed fighters are based.

The conflicting reports around the announcement reflect the chaos that is likely to ensue after the President Donald Trump’s surprise decision earlier this month to withdraw U.S. troops, as all sides of the conflict scramble to find ways to replace them.

The U.S. decision would leave areas in east Syria, around 30 percent of the country's territory, up for grabs, and undermines a four-year-old partnership with the Syrian Kurdish fighters.

Ilham Ahmed, a senior Kurdish official, said the U.S. troops have not yet withdrawn from Manbij. She said an agreement is being worked out between the Russians and the Syrian government in which the latter takes over once the withdrawal is complete.

"The aim is to ward off a Turkish offensive," Ahmed said. "If the Turks' excuse is the (Kurdish militia), they will leave their posts to the government."

The Syrian Kurdish group, the Kurdish People's Protection Units, or YPG, which had partnered with the U.S. since 2014 to fight the Islamic State group, has reached out for new allies. Turning to the government and Russia, the group is looking to protect their Kurdish-administered areas in north Syria from a Turkish offensive.

The Syrian government has said it welcomes the Kurdish group returning to areas under its authority. But government officials have stated they will not accept an autonomous area, a main demand for the Kurds.

Meanwhile, Syrian troops have massed outside of Manbij and in southeastern Syria, where the U.S.-led coalition and Kurdish fighters continue to battle remnants of IS.

Syria's entry into Manbij comes a day before Moscow is to host top Turkish officials to discuss the crisis in Syria after the United States announced its intended withdrawal.

Russia said it expects the Syrian government to take over the areas where the U.S. troops are currently deployed following their withdrawal.

Erdogan on Friday said his country's goal is ousting the Kurdish militia from along his country's borders.

"If terror organizations leave, then there is no work left for us anyway," Erdogan told reporters.

Turkey had been threatening a military operation against Manbij, and along with its allied Syrian fighters have been massing troops around Manbij and along the borders in recent days. Erdogan said Turkey's military was continuing its preparations.

Turkey considers the Kurdish People's Protection Units, or the YPG a terrorist group linked to an insurgency within its own borders.

The Syrian military declaration came shortly after the YPG invited the government to seize control of Manbij to prevent a Turkish attack.

The Syrian Observatory for Human Rights said Syrian troops have deployed around Manbij on the front line with the Turkey-backed fighters to the west.

"Based on the commitment of the Syrian military and armed forces to their national duties of asserting the state's sovereignty on every inch of territory in the Syrian Arab Republic and in response to the calls from the residents of Manbij, the Syrian general Command and Armed forces announce the entry of Syrian Arab Army units into Manbij and the raising of the Syrian Republic flag there," the Syrian military statement said.

A resident of Manbij who spoke to The Associated Press from the town on condition of anonymity said there was no sign of government troops inside the town.

Pro-state Syrian al-Ikhbariya TV aired footage from inside Manbij of commercial streets on a rainy day, but didn't show any troops. It carried images of a military convoy driving late at night, purportedly to Manbij.

The Turkish threats of an offensive on Manbij triggered the U.S. announcement it would withdraw troops from Syria. A timetable for the withdrawal has not yet been made public.

Associated Press writer Nataliya Vasilyeva from Moscow and Zeynep Bilginsoy in Istanbul contributed to this report.