The migrants, mostly from poor or war-torn countries in the Middle East, Africa and Asia, have streamed into Croatia since Wednesday, after Hungary blocked what had been the main route with a metal fence and riot police at its border with Serbia.
"We cannot register and accommodate these people any longer," Croatian Prime Minister Zoran Milanovic told a news conference in the capital Zagreb.
"They will get food, water and medical help, and then they can move on. The European Union must know that Croatia will not become a migrant 'hotspot'. We have hearts, but we also have heads."
The arrival of 17,000 since Wednesday morning, many crossing fields and some dodging police, has proved too much for one of the EU's less prosperous states in a crisis that has divided the 28-nation bloc and left it scrambling to respond.
A record 473,887 refugees and migrants have crossed the Mediterranean to Europe so far this year, the International Organization for Migration said, most of them from countries at war such as Syria who are seeking a better, safer life.
Hundreds of thousands have been trekking across the Balkan peninsula to reach the richer European countries to the north and west, especially Germany, which is preparing to accept 800,000 migrants this year.
But that has wrongfooted the European Union, which has come up with no common policy to deal with the biggest wave of migration to Western Europe since World War Two.
Hungary acted on its own to shut the main route this week by closing its border with Serbia, leaving thousands of migrants scattered across the Balkans searching for alternative paths.
Croatia, offering an overland route to Germany bypassing Hungary, found itself suddenly overwhelmed, and began sending migrants in trains and buses to Hungary.
Gyorgy Bakondi, head of Hungary's national disaster unit, said more than 4,000 migrants had arrived from Croatia on Friday without any prior consultation, and up to 1,200 more could come before the end of the day.
With tempers clearly fraying, he said authorities had seized a Croatian train carrying migrants to the town of Magyarboly, disarmed the police who were escorting it and arrested the driver.
Hungarian government spokesman Zoltan Kovacs said the incident "raised the suspicion of a border violation".
However, Croatian police spokeswoman Jelena Bikic said no one had been disarmed or arrested, the escort had been agreed in advance, and the police had returned to Croatia.
Hungary did, however, agree earlier in the day to register at least 1,000 migrants delivered from Croatia.
While Zagreb made welcoming statements earlier this week, Milanovic said he had called a session of Croatia's National Security Council and that it was time to deal with the problem differently. The president has told the military to be ready if called on to help stop the flow of people.
European Commission President Jean-Claude Juncker spoke to Milanovic by phone to offer Croatia technical and logistical help in coping with the flood of migrants.
Croatia, the EU's newest member state, has already closed almost all roads from the border. Interior Minister Ranko Ostojic said if the crisis continued "it is a matter of time" before the border was shut completely, though Milanovic, in his remarks, questioned whether even that would keep migrants out.
Police have rounded up many migrants at the Tovarnik railway station on the Croatian side of the border with Serbia, where several thousand spent the night under open skies.
"We are so exhausted," said Hikmat, a bare-footed 32-year-old Syrian woman from Damascus, after a journey, like many others, by sea and then through the Balkans to the border between the two former Yugoslav republics.
She said she had been traveling for two months with her son, and added: "Look at me. I just want to get anywhere where we will be safe."
Some kept traveling and reached tiny EU member Slovenia overnight. Many did so by evading the police and trekking through fields or traveling by train, exasperated by Europe's confused response to the crisis.
"I didn’t expect such a reaction from Europe ... They first open the doors then they close them. They punish the people,” Syrian migrant Dara Jaffar said at Tovarnik's railway station.
Worried by the situation, Slovenia stopped all rail traffic on the main line from Croatia. Late on Friday, Prime Minister Miro Cerar - reversing his earlier stance - said Slovenia might consider forming a "corridor" for migrants to pass via its territory to western Europe "if the pressure is too great".
A Reuters reporter saw Slovenian riot police using what appeared to be pepper spray on a crowd of migrants trying to cross the border from the Croatian village of Harmica.
Unlike Croatia, Slovenia is a member of Europe's Schengen zone of border-free travel, an important goal for refugees. With around 1,000 migrants expected to enter Slovenia in the next 24 hours, it has said it plans to abide by EU rules by receiving asylum requests but returning illegal migrants.
EMERGENCY EU SUMMIT
After failing to agree on a plan to distribute 160,000 refugees across the EU -- just a fraction of the numbers arriving this year -- the bloc has called a summit for Wednesday to work on a united response.
Donald Tusk, who chairs EU summits, called on Friday for a credible EU migration policy and said member states must stop shifting responsibility onto their neighbors.
In a letter addressed to the 28 leaders ahead of the summit, Tusk, a former Polish prime minister, also urged them to provide donations to the World Food Program to help feed some 11 million refugees in Syria and the region.
Tempers are fraying among some migrants trekking across Europe.
In the Croatian town of Beli Manastir, just over the border from Hungary, angry groups of Afghan and Syrian migrants, waiting for trains to Zagreb, fought with rocks and sticks at a ticket office.
Rocks, smashed bottles and broken sticks littered the ground. A handful of police in ordinary uniforms tried to restore control.
Relations between EU states have also been damaged, with several suspending the Schengen rules to restore emergency border controls to slow the flow.
Despite criticism by rights groups and some EU officials, Hungary's right-wing prime minister, Viktor Orban, said his country was extending the fence along its southern border with Serbia to the Croatian section.
Serbia warned its neighbors against shutting down the main arteries between them, saying it "will seek to protect our economic and every other interest before international courts".
Germany, which is planning to host by far the largest number of refugees, says other EU countries must do their part.
Some other EU states, especially former Communist countries in the east, reject quotas to accept refugees. They accuse Berlin of exacerbating the problem and encouraging the overland surge by suspending EU rules to announce in August it would take in Syrian refugees wherever they enter the EU.
German Economy Minister Sigmar Gabriel renewed a threat that countries that do not help in the migrant crisis will be deprived of EU funds.
Interior ministers will try to overcome the differences on Tuesday, a day before the summit of EU leaders.
"These occasions may be the last opportunity for a positive, united and coherent European response to this crisis. Time is running out," Adrian Edwards, spokesman for the U.N. refugee agency, said in Geneva.