US troops have returned fire after being repeatedly shot at by Turkish-backed rebels in northern Syria, in a rare such exchange in the six-year war.

The soldiers were patrolling near an area held by the opposition fighters in the town of Manbij when they were fired on, according to Colonel Ryan Dillon, the US-led coalition’s spokesman.

"Our forces did receive fire and return fire and then moved to a secure location," he said on Tuesday night. “We have told Turkey it is not acceptable.”

Turkey is a US ally in the conflict in Syria, where both countries have been arming and training rebel fighters.

However, Ankara has repeatedly rebuked Washington for backing Kurdish fighters in the north of the country, where they are fighting to oust Islamic State of Iraq and the Levant (Isil).