Croatian prime minister Zoran Milanovic says his country cannot and will not close its borders to migrants, and is transporting people to Hungary and Slovenia and further towards western Europe.

Mr Milanovic said Croatia's capacity to take in migrants is full and authorities can no longer register people in accordance with EU rules.

The operation got under way as 19 buses carried migrants across the border to Beremend, Hungary, where they were put on Hungarian buses. It was not clear where they were taken next. Those asking for asylum will have their requests decided quickly, under law passed this week, while the rest could be sent back to Croatia.

The Croatian government earlier closed all but one border crossing with Serbia after more than 14,000 migrants entered Croatia by that route following a move by Hungary to close its border.

Mr Milanovic said: "What else can we do? You are welcome in Croatia and you can pass through Croatia. But go on. Not because we don't like you but because this is not your final destination."

The Croatian move sparked anger from Serbia, Hungary and Slovenia.

Serbia fears the closure will block thousands of migrants inside the country, and social affairs minister Aleksandar Vulin said Serbia will take Croatia to international courts if the border crossings remain closed.

Hungarian government spokesman Zoltan Kovacs said that although Croatia knew what it would be confronted with, its "supply system collapsed in a single day. Hungary has been holding its own for the ninth consecutive month".

Mr Kovacs said it was "totally unacceptable for a European country to not respect European rules just because it was unprepared", predicting that Croatia would be "set back by many years" in its efforts to join the EU's Schengen zone of passport-free travel.

Slovenia has been returning migrants to Croatia and has stopped all rail traffic between the two countries.

Despite the move to close most border points, migrants and refugees are still pouring into Croatia. Most of them want to move on towards Germany or the Scandinavian countries.

Croatian authorities say the situation is worst in the eastern town of Beli Manastir, where thousands of refugees have converged and caught local authorities unprepared.

About 2,000 people also gathered in the border town of Tovarnik waiting for bus or train rides to refugee centres in the capital Zagreb and elsewhere.

The UN refugee agency warned of a "build-up" of migrants in Serbia.

Adrian Edwards of UNHCR said stricter border controls by Hungary and Croatia threaten a bottleneck in Serbia, "which is not a country with a robust asylum system".

Mr Edwards said: "You aren't going to solve these problems by closing borders."

He added that the crisis "is growing and being pushed from one country to another" as roughly 4,000 people pour into Greece each day and head north.

UNHCR says more than 442,440 people have crossed the Mediterranean Sea to Europe this year, and 2,921 have died trying.

Babar Baloch, regional spokesman for central Europe for the UNHCR, called for a joint European response, saying countries cannot cope individually.

He said his organisation can handle the humanitarian response, but "what's missing is a collective EU action".

Mr Baloch said that "within three days we can put in place mechanism for refugee arrivals ... or empty our warehouses in Dubai, Copenhagen and other places".

He added: "We know how to do the job, but the responsibility, the moral and legal responsibility here, is on the countries in the European Union."

The growing chaos provoked mixed responses in western Europe as the European Union said the bloc will not leave Balkan countries to deal with the refugee crisis on their own, but Germany said it could be necessary to force eastern European nations to accept quotas for migrants.

European Union enlargement commissioner Johannes Hahn said all EU countries "have the task to protect the external borders".

He was addressing the parliament in Macedonian, which has seen tens of thousands of migrants cross from its southern border with Greece to its northern border with Serbia as they head north. Macedonian police said more than 83,000 have moved through the small Balkan nation in the last three months.

"You are not a parking lot for refugees, you are also victims of the situation and we won't leave you alone," Mr Hahn said.

German foreign minister Frank-Walter Steinmeier warned in a newspaper interview that Germany, Austria, Sweden and Italy cannot bear all the burden of migrants coming to Europe.

Mr Steinmeier told the Passauer Neue Presse daily that "if there is no other way we need to seriously consider using the instrument of a majority decision" imposing quotas on all countries.

French prime minister Manuel Valls said the European Union must take control of its borders or the Schengen agreement "will be challenged".

Mr Valls said it is urgent to find an agreement on permanently relocating refugees, saying Europe is facing "an unprecedented migration".

He said the EU must also decide on a policy for returning people who left their home countries for economic reasons and do not qualify for asylum.

He spoke in Stockholm where he met his Swedish counterpart Stefan Lofven ahead of a meeting on migrants in Vienna.

Both called for a solution where "all countries in the EU share their responsibility", Mr Lofven said.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.