Tovarnik, Croatia (CNN) Hungary lashed out at neighboring Croatia on Friday, saying Croatia is helping migrants and refugees from the Mideast cross borders illegally.

Hungarian officials were inflamed when Croatia sent a train carrying 1,000 migrants and 40 Croatian police officers across the border without permission, Hungary government spokesman Zoltan Kovacs said.

The train went to a railway station six kilometers inside Hungary, where the train was seized and the Croatian police officers were disarmed, Kovacs said.

"This is a violation of the international law and this act is considered completely illegal," Kovacs said.

Kovacs said the police officers were sent back to their country and the train driver was held in custody. Hungary will take care of the migrants and provide them shelter, food, medical assistance, he said.

With razor wire and militarized borders, tear gas and water cannons , Hungary has gotten a reputation as one of the most heavy-handed -- some say cruel -- European countries dealing with the ongoing influx of migrants and refugees.

But Kovacs, in an impromptu press conference at the border, defended his country's tactics over the past nine months and insisted it would follow European Union protocols -- without specifying what those protocols require.

The Croatian government's immigration strategy , meanwhile, "collapsed within one day," according to Kovacs. And on Twitter, the spokesman accused Croatia of lying and breaking "all relating EU regulations."

Croatian govt says they agreed with Hun govt on "free passage" for illegal migrants; THAT'S A LIE! They break all relating EU regulations. — Zoltan Kovacs (@zoltanspox) September 18, 2015

He was referring to Croatia's openness earlier this week to migrants , with security forces even helping what started as a trickle and then became a steady stream of migrants cross its borders. But things changed Thursday, when the country closed seven of its border crossings with Serbia.

Croatian police said Friday that more than 14,000 migrants had crossed in since the country opened its borders. But the U.N. refugee agency said Croatia was only prepared to handle 500 migrants a day.

Also on Friday, Hungarian Minister of Foreign Affairs and Trade Péter Szijjártó characterized the behavior of Croatian Prime Minister Zoran Milanović as "pathetic," according to a post on the official website of the Hungarian government.

According to Szijjártó, Milanović has said the migrants and refugees from war-torn Mideast nations are receiving food and water in Croatia and are free to travel wherever they wish via Hungary and Slovenia.

"Perhaps he should instead answer the questions as to what mistakes he made during preparations for the arrival of the immigrants and why Croatia was unable to care for and accommodate the refuges for even a single day," Szijjártó said.

Hungarian mayor issues warning to migrants

Along the Hungarian side of the border, meanwhile, thousands of migrants have been confined to buses.

Kovacs said these people would be brought to a shelter, where they'd be fed and processed for a few days. After that, they would be free to go.

Whether they'd be allowed to cross into other countries or be welcomed by people within Hungary is an entirely other matter.

There's been not a lot of open arms to date. Friday saw more tear gas and water cannons that drove away weary migrants, which spurred the mayor of a border town to post an online video with a warning: If all that's not enough to keep you away, I've got methods of my own.

In the two-minute action piece in Hungarian with English subtitles, Laszlo Toroczkai said he has his own backup for the nation's troops.

"On the territory of Asotthalom they (troops) are supported by militant field guards and civil guards," he says to action-packed music. On horseback, by motorcycle, all-terrain vehicle and helicopter, his men zip along the razor wire fence.

He then stands broad-legged staring through dark glasses with muscly men lined up behind him and tells migrants to go through Croatia and Slovenia if they want to get to Germany.

"Do not trust the lying human traffickers," he says. "Hungary is a bad choice. Asotthalom is the worst."

His may have been the most dramatic rejection, but throughout Europe, migrants are increasingly getting the cold shoulder.

And on Friday, French police said a migrant was electrocuted while trying to hop on a freight car headed to Britain, a reminder of the dangers migrants face.

Hungary's new fence

Hungary said Friday it was extending its state of emergency prompted by the migrant crisis and planned to build a temporary security fence along its border with Austria and Croatia over the weekend. The government had already sent 600 soldiers to the Croatian border and was sending 500 more.

The human stream kept coming into Europe on Friday from the southeast -- from Syria, Iraq and Afghanistan. From Turkey, Jordan and Lebanon, where refugee camps are overflowing and the World Food Program has cut food rations for lack of funding.

And they are looking for pathways to Germany.

Hungary has started building a 41-kilometer (25-mile) fence down the Croatian border, Hungary's International Communications Office said.

And Hungary rebuked Croatia this week over its previous generosity. Budapest's Minister of State Laszlo Szabo summoned Croatia's ambassador Thursday, telling him "that his country's procedure is unacceptable."

This little refugee kid crying after Hungary police use tear gas& water canons 2 disperse migrants on Serbia border pic.twitter.com/oIQ4WQlgqt — gultuysuz (@gultuysuz) September 16, 2015

Rivers, mountains, landmines

The path to Austria via Croatia looks shorter on a map, but it is also more arduous, leading over rivers and mountains, and old battle lines of the Balkan Wars in the 1990s, where leftover scattered landmines and other unexploded ordnance lurk beneath the brush.

The path also leads through Slovenia, which, like Hungary, is an European Union border frontier. And it seems resistant to letting migrants pass through.

Slovenian Prime Minister Miro Cerar tweeted Thursday that his country is committed to protecting the EU's external borders. And allowing migrants safe passage through the country would violate national and European law, the country's interior ministry said.

And Austria, the next country in the chain to Germany, has reinstated border control measures on its border to Slovenia.

JUST WATCHED Europe's migrant crisis by the numbers Replay More Videos ... MUST WATCH Europe's migrant crisis by the numbers 01:17

Tougher law in Germany?

Even if they make it to Germany, which had let in tens of thousands of migrants early on, they could encounter closed borders. Lawmakers there are working to make it easier to deport quickly those who don't achieve refugee status, German public television broadcaster ARD has reported.

The bill also cuts the level of aid provided to refugees in Germany.

On Thursday, Germany's minister for migration and refugees resigned. Manfred Schmidt had been criticized for the slow process of dealing with asylum application and creating a backlog.

At the end of last month, 276,617 applications still needed to be processed.

JUST WATCHED Migrants must make their own way into Europe Replay More Videos ... MUST WATCH Migrants must make their own way into Europe 01:01

A huge crisis

Aid workers say Europe is facing its largest refugee and migrant crisis since World War II.

More than 473,000 migrants have come to Europe by sea so far this year, more than double the number that arrived during all of 2014, the International Organization for Migration said. At least 182,000 came from war ravaged Syria. The United Nations put the overall number arriving in Europe at 442,440.

The EU is still trying to figure out how to distribute 160,000 migrants -- and whether to set quotas for member countries to absorb them.

Eastern European countries in particular have shown resistance to committing to a quota.

Switzerland, however, said Friday that it would take 1,500 refugees registered in Italy and Greece if the EU can decide on an overall relocation program.