(This November 15 story was corrected to clarify in paragraph three that not all people evacuated were fighters)

ANKARA (Reuters) - Turkey on Tuesday said it was appalled by the approach of the U.S. Department of Defense towards an agreement between the Syrian Kurdish YPG militia and Islamic State to withdraw Islamic State militants from the Syrian city of Raqqa.

Last month, a YPG militia spokesman said that Syrian Islamic State fighters were set to abandon Raqqa in a withdrawal agreed with U.S.-backed Syrian militias.

On Sunday, a report by the BBC said some 4,000 people, including hundreds of foreign nationals, had been evacuated from Raqqa as part of the agreement and spread across Syria and as far as Turkey.

“Seeing that statements from the spokespeople of the international coalition against Islamic State and the U.S. Department of Defence have not denied the existence of the given agreement, but to the contrary said they ‘respected’ it is appalling,” Turkey’s Foreign Ministry said in a statement.

Ankara has been infuriated with Washington over its support of the YPG militia, seen by Turks as an extension of the outlawed Kurdistan Workers Party (PKK), which has fought a decades-long insurgency in Turkey and is designated a terrorist group by Ankara, the United States and European Union.

The ministry said the withdrawal of Islamic State militants

from Raqqa was “extremely troubling”, and added that it was a development that “should be noted”.

“The agreement in question has become an example that if a battle is carried out with a terrorist organization, those terrorist organizations will eventually opt to cooperate with each other,” it said.

After Raqqa’s fall to the Syrian Democratic Forces (SDF) in October, Syria’s army declared victory over Islamic State last week, saying its capture of the jihadists’ last town of Albu Kamal marked the collapse of their three-year, hardline reign in the region.