Turkish President Recep Tayyip Erdogan has condemned the United States' support of Kurdish fighters in Syria after a photographer revealed US commandos wearing the insignia of a militia branded a terror group by Ankara.

Key points: A photographer captured images of a US commando sporting Kurdish militia insignia

A photographer captured images of a US commando sporting Kurdish militia insignia US quickly announces its forces will cease the practice

US quickly announces its forces will cease the practice It does not consider the YPG to be a terrorist group, whereas Turkey does

"The support they give to ... the YPG (militia) ... I condemn it," Mr Erdogan said. "Those who are our friends, who are with us in NATO ... cannot, must not send their soldiers to Syria wearing YPG insignia."

Mr Erdogan's comments came after an AFP news agency photographer captured images of US troops in Syria wearing the insignia of the Kurdish People's Protection Units (YPG).

Ankara regards the YPG as a terror group, accusing it of carrying out attacks inside Turkey and being the Syrian branch of the Kurdistan Workers' Party (PKK) which has fought an insurgency against the Turkish state for over three decades.

The United States does not consider the YPG to be a terrorist group.

"The PKK, the PYD, the YPG, Daesh (Islamic State group), there is no difference. They are all terrorists," Mr Erdogan said.

It had long been public knowledge that around 200 US commandos are in northern Syria helping local militia target the IS extremists' de facto capital Raqqa and guiding coalition air strikes.

Mr Erdogan, speaking in the majority Kurdish city Diyarbakir, accused the US of being dishonest because of its support for the militia and its political wing the Democratic Union Party (PYD).

"I believe that politics should be exercised with honesty," he said.

The US, seeking to avoid a rift with ally Turkey, swiftly announced on Friday that special operations troops in northern Syria would henceforth stop wearing the badge of the YPG guerrillas.

YPG fighters take up positions inside a damaged building to monitor Islamic State militants. ( Reuters: Rodi Said )

"We understand Turkey's concerns, and let me make that clear," said State Department spokesman Mark Toner, "And we continue to discuss this as well as other concerns that Turkey has regarding Islamic State."

Asked at a briefing on Thursday if it was appropriate to wear such insignia, Pentagon press secretary Peter Cook declined to comment on the photographs.

But he said that when special forces operate in some areas they do what they can to blend in with the community to enhance their own security.

The State Department insisted that Washington and Ankara remain close partners in the broader fight against IS, despite disagreements about the role of the YPG.

Turkish Foreign Minister Mevlut Cavusoglu accused the US of "hypocrisy" and "double standards" and said the American soldiers might just as well have worn the logo of Al Qaeda, IS or Boko Haram.

The US has blacklisted the PKK as a "foreign terrorist organisation" but regarded its Syrian-based sister group PYD as a useful ally in the face of the IS threat.

The YPG provides the bulk of the so-called Syrian Democratic Forces fighting the IS group.

AFP/Reuters