US President Donald Trump warned Turkey against going too far in Syria, after giving Ankara a green light to invade its southern neighbour.

Mr Trump said on Monday he was done with "ridiculous endless war" as he stood aside to allow a long-threatened Turkish assault on Kurdish-held Syria, effectively abandoning its allies who fought Islamic State of Iraq and the Levant (Isil).

The US had for months been working with Turkey to try to create a buffer zone along its border with northern Syria between the Turkish military and Kurdish forces which Ankara sees as terrorists.

But amid an outcry from the region and strong opposition at home from both Democratic and Republican lawmakers, the US leader appeared to reverse himself, though without drawing any specific red lines that might protect Kurdish allies.

"If Turkey does anything that I, in my great and unmatched wisdom, consider to be off limits, I will totally destroy and obliterate the Economy of Turkey (I've done before!)," Mr Trump tweeted.