Thousands of migrants, including many women and children, have spent a night in rain and cold in the Balkans as countries argue over how to handle the large influx of people.

Many were stranded at Croatia's border with Slovenia after Croatia sent a train there despite Slovenia's refusal to take the people into the country. The train carrying about 1,800 people arrived in the early hours of the morning on Monday.

Hundreds of migrants were also left waiting in the mud on the border between Serbia and Croatia, after Croatian police put up gates to control their influx.

Croatian police ordered the migrants off the train, but Slovenian police were deployed to the border and put up iron barriers to prevent a mass entry. For hours, the migrants sought ways to sneak into Slovenia on foot while Croatian police on the other side prevented them from turning back.

Slovenian police said they would first register women and children from the train and let them into the country, while the rest remained stranded on a field amid driving rain.

The border incident has caused a diplomatic dispute between Croatia and Slovenia, with Slovenia accusing Croatia of breaching an earlier agreement that only 2,500 people can be transported into the country each day. That figure appeared to have been reduced by the Slovenes to 1,500 a day because they said that is how many neighbouring Austria allow across its border each day.

After Austria denied it is restricting the flow, Slovenia's interior minister said her country can handle up to 2,500 migrants a day and criticised Croatia for transporting more than the agreed figure to their border, saying it is "absolutely unacceptable".

Vesna Gyorkos Znidar said Croatia has started to send an "unlimited number of migrants ... which we can't accept."

She said "the Croatian side is not responding" to the Slovenian demands to control the flow and is acting only as "a transporter" of migrants.