Turkey has accused Kurdish militia fighting Islamic State (Isis) militants in northern Syria of "ethnic cleansing".
Kurdish militia seized the border town of Tel Abyad from IS, cutting a crucial line used by the extremist group to supply territory it controls in Syria.
Thousands were forced to flee fierce fighting between the groups, with Kurdish forces supported by air strikes from a US led coalition.
The victory has left Kurdish militia in control of almost half of the Syrian side of the 559 mile (900km) border with Turkey, across which thousands of foreign fighters have crossed to join IS.
However this has raised fears in Turkey of growing separatist sentiment among its own Kurdish population.
"Daesh [Isis] attacks and kills those it captures. PYD/PKK [Kurdish militias] seize certain regions and force people living there to migrate," foreign minister Mevlut Cavusoglu told Turkish state broadcaster TRT, reports Reuters.
"It doesn't matter who comes; the regime, Daesh, the PYD, they are all persecuting civilians."
He said that 23,000 refugees had crossed the border into Turkey to escape the militias.
Turkish Deputy Prime Minister Bulent Arinc said late on Monday 15 June there were signs "pointing towards a kind of ethnic cleansing" by both Kurdish and Islamist militias, and President Recep Tayyip Erdoğan has accused the West of helping "terrorists" in backing Kurdish militia the YPG.
It alleges that the group is an offshoot of the PKK, which is designated a terrorist group by the US and Turkey.
Some Arab refugees fleeing into Turkey have complained of harsh treatment by Syrian Kurdish militias, reports Turkish newspaper Today's Zaman.
The Kurdish YPG in an online statement denied it had forced civilians from areas it seized or that "racist war" is taking place, and said it would offer safe passage to civilians wishing to return to areas it now controls.
Thousands have begun returning to the town.
The UK based Syrian Observatory of Human Rights, which monitors the conflict in Syria, says there is no evidence of systematic abuses by the YPG.