Syria’s foreign minister demanded on Saturday that American and Turkish forces evacuate the war-ravaged country immediately or face “any and all countermeasures authorized under international law.”

Syrian officials have made similar threats in the past to push unauthorized forces from the country but have never taken serious steps to do so. Syrian troops, which have been ground down by years of war and defections, are in no shape to fight the United States, and it appears that the country has calculated that any attacks on American forces would bring about a formidable response.

In a speech before the United Nations General Assembly, the foreign minister, Walid al-Moallem, said the United States and Turkey “maintain an illegal military presence in northern Syria.”

“Any foreign forces operating in our territories without our authorization,” he added, “are occupying forces and should withdraw immediately.”