The main U.S.-backed Syrian Kurdish militia, the YPG, will pull forces and heavy weapons from a strip along Syria’s border with Turkey, an official in the YPG-led alliance said on Tuesday.

The YPG withdrew from some border positions in recent days, proving it is serious about ongoing talks, the Kurdish-led authority running north and east Syria also said.

The developments were a sign of progress in talks between the United States and Turkey aimed at resolving deep differences over the presence in the border area of Kurdish fighters – allies of the United States that Turkey sees as enemies.

After Ankara repeatedly warned it would launch a military incursion into northeast Syria to push back the YPG from the border, Turkey and the United States said this month they had agreed on the first stages of a security deal along the border.

The two countries gave no details of the deal on what Turkey has called a safe zone inside Syria. It followed months of stalemate over how far the zone should extend into northeast Syria, still a main point of friction, and who should command forces patrolling it.

The YPG spearheads the Syrian Democratic Forces (SDF) alliance, which controls much of north and east of Syria. U.S. troops have been stationed in the SDF region for years, training and arming the fighters who seized territory from Islamic State.

President Donald Trump said late last year he would withdraw the U.S. troops, but has so far held back from doing so, in part to ensure that the Kurds are protected.

U.S. support for the YPG has enraged Turkey, which deems the militia a security threat linked to Kurdish insurgents at home.

SDF spokesperson Mustafa Bali told Reuters the strip along the border would vary between five and 14 kilometres and will include rural areas or military positions, not cities or towns.

The YPG and SDF will dismantle barricades there and hand over control to military councils of local fighters, he said.

Bali said Turkish and U.S.-led coalition forces would patrol the border strip but be based inside Turkey. The deal creates “a security mechanism, not safe zone, that assuages Turkey’s claims of fearing over its national security,” he added.

Differences remain between U.S., Turkey

Ankara has already sent its military twice into northern Syria to push YPG fighters from its borders in recent years.

A senior Turkish official told Reuters that Ankara and Washington had bridged some, but not all, of their differences.

“There was a rapprochement, but our insistence on the 20 miles [32 kilometres] persists. The United States has taken steps to improve this, but they are still not enough,” the official said. “It is not possible for us to accept the SDF’s presence there.”

President Tayyip Erdogan said on Monday that Turkish ground troops would enter the planned zone “very soon,” after setting up a joint military centre with Washington to oversee the operation at the weekend. Turkish drones and helicopters had already flown over the region, he said.

Erdogan said Turkey had made all preparations to carry out its own plans if its expectations are not met.

The YPG already withdrew from the Tel Abyad and Ras al-Ain areas, the authority running the SDF region said. The move shows commitment to “reaching a solution through dialogue,” the statement said.

About 2,000 U.S. troops have been stationed in the SDF region for years, training and arming the fighters in the battle against Islamic State.

Dozens killed in latest fighting

In northwest Syria, Syrian insurgents launched counterattacks Tuesday in and near areas recently taken by government forces in the country’s last remaining rebel region, after a series of setbacks they suffered in recent weeks, opposition activists said.

The fierce fighting killed more than 50 fighters on both sides, according to the Britain-based Syrian Observatory for Human Rights. It also underscored that President Bashar al-Assad’s forces will face a long, hard fight as they try to chip away at the last rebel-held territory.

This photo provided by the Ibaa News Agency, the media arm of al-Qaeda-linked Hayat Tahrir al-Sham militant group in Syria, purports to show a missile fired by the militant group against Syrian government forces position in Idlib province, Syria on Tuesday. Their fighters were trying to gain back territory recently ceded to the government’s forces. (Ibaa News Agency via AP)

The counterattacks began early in the morning and government forces called in Syria’s air force to repel them, the Observatory said. It said 29 Syrian troops and pro-government gunmen were killed, as well as 23 insurgents.

The insurgents captured two villages, Salloumieh and Abu Omar, and pushed into the nearby village of Sham al-Hawa, it said.

The pushback comes as Erdogan met Russian President Vladimir Putin in Moscow. Putin said after the talks they had outlined additional joint measures aimed at rooting out “terrorists” in Idlib province, without offering much in the way of specifics.

Foreign Minister Sergei Lavrov acknowledged that Russia had military personnel on the ground in Idlib after his country initially downplayed its direct military role in the campaign that began in April.

The Russian military have in the last few weeks sent more special forces that helped break months of stalemate on the frontlines.

Russian and Syrian jets have stepped up strikes on villages and towns around Maarat al-Numan in Idlib, from which tens of thousands of people have fled in the last two weeks fearing an imminent assault.

The months of fighting have displaced more than half a million civilians toward northern parts of Idlib, already home to some three million people, according to UN humanitarian officials.