Members of Syrian National Army, known as Free Syrian Army, drive in an armored vehicle in the Turkish border town of Ceylanpinar in Sanliurfa province, Turkey, October 11, 2019. REUTERS/Murad Sezer

BEIRUT/AMMAN (Reuters) - The Syrian army will deploy along the length of the border with Turkey in an agreement with the Kurdish-led administration in northern Syria to help repel a Turkish offensive, the Kurdish-led administration said on Sunday.

The army deployment would support the Kurdish-led Syrian Democratic Forces in countering “this aggression and liberating the areas that the Turkish army and mercenaries had entered”, it said, in reference to Turkey-backed Syrian rebels.

It would also allow for the liberation of other Syrian cities occupied by the Turkish army such as Afrin, the statement said. The Turkish army and its Syrian rebel allies drove Kurdish forces from Afrin in 2018.

The agreement follows last week’s surprise move by the United States to pull a group of its forces from a section of the border, opening the path for Turkey’s incursion.

The SDF, a vital U.S. ally in the campaign against Islamic State, has called Washington’s move “a stab in the back”.

“In order to prevent and block this (Turkish) assault agreement has been reached with the Syrian government - whose duty is protect the borders of the country and to protect Syrian sovereignty - for the Syrian army to enter and deploy along the length of the Syrian-Turkish border,” the statement said.

Kurdish-led forces have established control over swathes of eastern and northern Syria since the country descended into civil war in 2011, setting up their own governments but always saying their aim was autonomy rather than independence.

Despite mutual enmity between these Kurdish groups and Damascus, where the Baathist government systematically persecuted Syrian Kurds, the SDF has seldom clashed with the Syrian government during the war.

The sides have also at times appeared to coordinate military campaigns against shared enemies, notably the Turkey-backed rebels taking part in the offensive with the Turkish army.