The UN chief has said he was "shocked" after Hungarian riot police fired tear gas and water cannon at crowds of refugees desperate to cross the border from Serbia.
When asked about the border clashes on Wednesday, Ban Ki-moon said the treatment of the refugees by the Hungarian police was "not acceptable".
Tensions boiled over at the Horgos-Roszke crossing where hundreds of furious people tore down the wire meshing separating them from Hungarian territory, and police clashed for hours with refugees, some of whom threw stones, sticks and plastic bottles.
The unrest left 14 Hungarian police officers injured, the authorities said.
Serbia lodged a formal protest with Hungary over the use of tear gas on its territory, and Nebojsa Stefanovic, interior minister, said police reinforcements were being sent to the Serbian side of the border to help calm tensions.
"We want to leave! We want to leave to Germany!" cried one French-speaking man at a protest at the border through a megaphone.
"Open the door!" he added in English, with hundreds echoing his call.
In the chaos, at least four children were separated from their families and apparently taken by police to a nearby border control building, according to Amnesty International, the human-rights organisation, said.
"The families are desperate to be reunited with their children," Tirana Hassan, crisis response director, said.
"Not only have they experienced the traumatic journey to the border and the use of force by the police - they have now lost the security of being with their parents."
Large numbers of refugees camped out by the side of the road in the Serbian village of Horgos, close to the Hungarian border overnight into Thursday.
Some have tents whilst others lie under blankets to keep warm. Small groups gathered around makeshift fires after a night exposed to the elements.
The road leading to the closed border, that is protected by gates and barbed wire, bore the scars of the Wednesday's clashes. Scarred clothing and plastics could be seen stuck to the tarmac close to the border.
Under its new rules, Hungary said it had determined Serbia was "safe", and therefore it could automatically deny asylum claims at the border.
Meanwhile, the Red Cross said on Thursday that several thousand people had entered Croatia in the last 24 hours, as refugees shifted their route through the Balkans after the Hungarian border closure.
"I cannot assess the exact figure, but it is surely several thousand people that entered the country," said the local Red Cross spokesperson.
The last official police figure from Wednesday evening was around 1,500 people.
"We witnessed more inflow of people overnight," she said.
Migrants sleep at the border with Hungary near the village of Horgos, Serbia, September 17, 2015.