Hungary closed border crossings to immigrants early Saturday, shutting off a popular route for refugees heading to richer EU nations like Austria and Germany.
The right-wing government of Prime Minister Viktor Orban has erected a razor wire fence along its 300-kilometer (186 mile) border with Croatia.
"The Hungarian government has taken the steps ... to protect the internal European freedoms and the security of the citizens of Hungary and Europe," government spokesman Zoltan Kovacs said early Saturday.
The regular traffic between the two EU countries is expected to continue normally, although with tighter inspections.
"We will introduce stricter controls to be able to block border crossings done illegally," Hungarian Foreign Minister Peter Szijjarto said.
Over 383,000 migrants from crisis areas in Africa and the Middle East have entered Hungary in 2015, most of them arriving across Greece, Macedonia and Serbia. In September, Budapest blocked off the frontier with Serbia, forcing the refugees to take a detour through Croatia.
Slovenia suspends passenger trains
Earlier on Friday, Croatian Interior Minister Ranko Ostojić announced that his country would respond to the Hungarian measures by sending refugees to Slovenia, the Alpine country wedged between Croatia and Austria.
"Considering the information on the closing of the Hungarian border, meaning halting the reception of people directed towards Hungary, we are shifting the corridor towards Slovenia," he said.
However, Slovenia on Friday temporarily halted trains coming from Croatia.
"Given the exceptional circumstances, the passenger traffic between Croatia and Slovenia has been suspended," Slovenia's national rail company said on its website, adding it had taken the decision "in coordination with the authorities."
Earlier, Slovenia's Interior Minister Vesna Gyorkos Znidar said her government was talking to Croatian authorities about establishing "one or two" border crossings for the migrants.
Foreign Minister Karl Erjavec also suggested that Slovenia could cope with the situation, as long as Germany keeps its door open.
"If the flow continues at the current pace, we will be capable of managing it. If this system breaks down, we don't know what could happen," he told reporters.
dj/jm (AFP, Reuters, AP, dpa)