Donald Trump threatened to “devastate” Turkey’s economy if its attacks Kurdish militants in Syria after the planned withdrawal of US troops from Syria.

The president’s extraordinary warning to a Nato ally saw the Turkish lira slide against the dollar and prompted backlash from Ankara.

Mr Trump said on Twitter the US was starting the military pull-out from Syria, but would continue its offensives against remaining Isis fighters there.

“Will attack again from existing nearby base if it reforms,” he wrote. “Will devastate Turkey economically if they hit Kurds. Create 20 mile safe zone...Likewise, do not want the Kurds to provoke Turkey.”

The lira fell as much as 1.6 percent to 5.5450 against the dollar in the hours after Mr Trump’s comments.

Relations between the two nations have been strained by US support for the Kurdish YPG, which Turkey sees as an extension of the outlawed Kurdistan Workers Party (PKK) that has been leading an insurgency on Turkish soil for more than 40 years.

A diplomatic crisis only last year over the detention of an American pastor in Turkey saw the lira reach a record low in August when Mr Trump imposed sanctions on two of president Recep Tayyip Erdogan’s ministers and raised tariffs on Turkish metal exports.

Turkey’s presidential spokesman, Ibrahim Kalin, said Mr Trump should respect Washington’s alliance with Ankara.

“Mr @realDonaldTrump It is a fatal mistake to equate Syrian Kurds with the PKK, which is on the US terrorists list, and its Syria branch PYD/YPG,” he said on Twitter on Monday.

“Terrorists can't be your partners & allies. Turkey expects the US to honor our strategic partnership and doesn't want it to be shadowed by terrorist propaganda.”

Mr Trump gave no details about the safe zone proposal. He made the surprise announcement last month that US forces were withdrawing from Syria, declaring they has defeated Isis insurgents in the war-torn country.

However, US officials have given mixed signals about the plan since then. Security adviser John Bolton claimed earlier this month the plan still relied on the defeat of small pockets of remaining Isis resistance and assurances over the safety of Kurdish fighters.

The Kurdish YPG - a US ally in the fight against the jihadists - controls swaths of northern Syria. However, Mr Erdogan has vowed to destroy it in the wake of a US withdrawal from the region.

Support free-thinking journalism and attend Independent events

Mr Erdogan’s communications director Fahrettin Altun wrote on Twitter: “Turkey will continue its anti-terror fight decisively” and that it was a protector of the Kurds, not their enemy."

Ankara has swept YPG fighters from Syria’s Afrin region and other areas west of the Euphrates river in military campaigns over the past two years.

It is now threatening to strike east of the river, which it has avoided until now - partly to avoid direct confrontation with US forces.

An official from the US-backed Syrian Democratic Forces, a coalition of militias led by the YPG, said on Sunday that Isis militants were “living their final moments” in the last enclave they hold near the Iraqi border.