Hungary confirmed it had sealed its border with Serbia on Tuesday as its controversial new anti-migrant laws came into force.
"The Roszke and Asothalom road crossing points have been put out of operation from Tuesday 07:00 am (0500 GMT)," said Laszlo Balazs, a border police official, at a press conference in Budapest.
There were conflicting reports from the border, with some aid agency staff saying the Roszke crossing had been closed from midnight.
"The border was shut and has yet to re-open," said Babar Baloch, a UNHCR spokesman at the border.
"Our staff do not have access, and the Hungarian authorities have not let us know about any schedule they have for re-opening the border," he added.
After it closed off the main, unofficial entry point used by migrants on Monday, Hungary had continued to let them enter through an official border entry post around two kilometres (1.6 miles) further down.
But it said on Tuesday it was no longer allowing people to enter even through the official route because Serbia was not controlling the flow of people.
"The measure is in place due to the situation that has developed on the Serbian side, as border controls are not being provided," said Balazs, adding that it could re-open if the situation changes.
Hungarian police said that a record 9,380 people entered Hungary on Monday -- almost twice as many as the previous records set last week -- although this did not fit with information from AFP reporters at the scene who saw far fewer migrants at the border than previous days.
"UNHCR is concerned that the combination of different individual measures might create a situation where large numbers of refugees seeking asylum in Europe -- the protection they are entitled to receive in line with international law -- will find themselves moving around in legal limbo," said Baloch from the UNHCR.
Those who had made it through the border before it shut were taken by bus to a train station at the border town of Roszke where they got on trains.
Unconfirmed reports suggested they were being taken to the Austrian border.
Fayik, a 20-year-old Afghan who made it into Hungary less than 24 hours before the border fence was closed, told AFP he had been taken straight to the Austrian border without being registered by Hungarian police.
"Luckily, they did not take us to a registration camp," he said by phone.
However, his hopes of reaching his uncle in Munich, Germany have not yet been successful.
"I wanted to go there and have a rest for some days," said Fayik, who made an urgent dash to get from Turkey to Europe before the Hungarian border shut.
"However... I am still on a train. They are taking us to Potsdam, near to Berlin."