Slovenia suspended Friday all rail traffic with Croatia until at least the evening and said that only those "meeting EU requirements" would be allowed to enter the country, as it braced for the arrival of migrants from Croatia.
Tents and shelters were being prepared in several parts of Slovenia, a member of the European Union and, unlike Croatia, of the passport-free Schengen Zone. The small country of two million people also borders Austria and Italy as well as Hungary.
Prime Minister Miro Cerar said late Thursday on state television that Slovenia would implement Schengen rules and that "only those meeting the EU's requirements can be allowed to cross the border."
The government also called an emergency meeting of its National Security Council on Friday to discuss the next steps.
The first larger group of some 150 migrants arrived on Thursday evening, crossing the Croatia-Slovenia border by train and were stopped just over the border in Dobova.
Local police initially planned to send them back to Croatia but despite hours of talks Croatia refused to accept them.
Slovenian authorities then moved the migrants to a centre in the west of the country "while a procedure for their return to Croatia is agreed," Slovenian police said.
Overnight another 100 migrants were intercepted attempting to crossing the border near the main border crossing of Obrezje, police spokeswoman Alenka Drenik said.
Slovenian media had reported late on Thursday that a group of around 600 migrants had left a refugee camp near Zagreb and marched towards the Obrezje border crossing, some 20 kilometres (12.5 miles) to the west of the Croatian capital.
At the Obrezje border crossing, the main road towards Croatia, the situation remained calm on Friday morning with an increased number of police deployed on both sides although small groups of migrants could be seen arriving.
Hungary this week sealed its border with Serbia, cutting off a major entry point into the European Union for tens of thousands of migrants from the Middle East, Asia and Africa travelling up through the western Balkans.
This diverted more than 11,000 migrants from Serbia into Croatia, overwhelming local authorities and forcing Zagreb to close most of its border on Thursday.