Syrian state media is reporting that government forces have reached an agreement with Kurdish militia to protect Syrian territory from further incursions by the Turkish army.

The Syrian army has already reached two separate positions in the north around 30km from the Turkish border.

The breakthrough deal may put an end to further advances by the Turkish army, as it is likely that Kurdish hopes of an independent state have diminished with the arrival of the Syrian army.

The widespread Turkish fear of a new Kurdish state was a key motivation in President Erdogan’s decision to invade and prevent its emergence.

The BBC reports:

Syrian state media say government forces entered Ain Issa on Monday, 30km (19 miles) south of the Turkish border. The deal came after the US, the Kurds’ main ally, said it would withdraw its remaining troops from northern Syria.

Turkey began an offensive in the region last week, aiming to push Kurdish forces from the border region. Areas under the control of the Kurdish-led Syrian Democratic Forces (SDF) came under heavy bombardment over the weekend, with Turkey making gains in two key border towns.

Dozens of civilians and fighters have been killed on both sides. The US announced on Sunday it was preparing to evacuate its 1,000 remaining soldiers from northern Syria.

The Turkish offensive and US withdrawal have drawn an international outcry, as the SDF were the main allies of the West in the battle against the Islamic State (IS) group in Syria.

There have been fears about a possible resurgence of the group and the escape of prisoners amid the instability. Turkey views elements of the Kurdish groups as terrorists and says it wants to drive them away from a “safe zone” reaching 32km into Syria.

President Recep Tayyip Erdogan hopes to resettle up to two million Syrian refugees currently in Turkey within the zone. Many of them are not Kurds and critics have warned this could lead to ethnic cleansing of the local Kurdish population.

What do we know about the deal?
The Kurdish-led administration in northern Syria announced it had reached an agreement on Sunday for the army to deploy along border areas controlled by Kurdish forces to “repel [Turkish] aggression”.

For now, they will not be deployed between Tal Abyad and Ras al-Ain, where Turkey has focused its efforts. Kurdish-led authorities insist they will remain in charge politically and retain order in the area.

By Monday Syrian state media said troops had entered Ain Issa and Tal Tamer.Sunday’s deal represents a significant shift in alliances for the Kurds. Despite suffering decades of suppression, Syria’s main Kurdish parties publicly avoided taking sides when the country descended into civil war in 2011.

When forces loyal to President Bashar al-Assad withdrew from mainly Kurdish areas to fight rebels elsewhere the following year, Kurdish militias took control.