Refugees at Spielfeld border in Styria , Austria. Following Hungary's closure of its border line with Croatia, the flow of migrants is expected to divert towards Slovenia instead of Hungary. (Erwin Scheriau/EPA)

Thousands of migrants surged into tiny Slovenia on Saturday as they desperately searched for a new passageway to Western Europe.

The closure of Hungary’s border with Croatia early Saturday caused the redirection of thousands of people — including women and small children soaked in cold rain — further west toward Croatia’s border with Slovenia. Croatian police say more than 5,000 migrants have entered the country since the border closure.

Several buses packed with migrants arrived in the Slovenian border town of Petisovci on Saturday. A train carrying 1,800 people arrived at the border in the afternoon. Police said that after processing, most are transferred toward the Austrian border.

The small European Union-member state, however, has limited capacity to process large numbers heading to wealthier E.U. countries such as Germany, Austria and Sweden. This could leave thousands stranded in Croatia and further east and south, in Serbia and Macedonia — the countries on the so-called Balkan migrant corridor.

The U.N. refugee agency said Slovenia has the capacity to accept some 7,000 migrants a day. Slovenian officials said, however, that they can permit only as many as 2,500 people a day and will allow new groups to enter only after previous groups leave the country.

A spokeswoman for the U.N. High Commissioner for Refugees said at Slovenia’s border with Croatia on Saturday that “all is going well” as the first groups of migrants started arriving in the small Alpine nation.

“We have been in cold since two in the morning in Serbia,” said Omar Thaqfa, 33, who said he is from Mosul in northern Iraq. “We were sitting in the street. Very cold. Inshallah, I am going to Germany.”

Slovenia, a nation of some 2 million, has said it will beef up border controls and create entry points for migrants to manage the influx but will keep accepting migrants as long as Austria and Germany keep their borders open. Croatia has said it will close its border with Serbia if Slovenia does the same with Croatia.

Migrants had been transiting through Croatia to get to Hungary and then further west. But Hungary blocked that route after midnight when police pulled a barbed-wire fence over a passage on the border with Croatia where about 190,000 migrants have passed since mid-September.

Croatian Interior Minister Ranko Ostojic said Hungary’s border closure will not stop the flow of hundreds of thousands of migrants from the Middle East, Asia and Africa who have been surging into Europe, seeking to escape war or economic hardship.

“Nobody can stop this flow without shooting,” Ostojic said, adding that further frontier closures would cause “a domino effect and lot of troubles for all countries” that are on the migrant route.

More than 383,000 migrants have entered Hungary this year, nearly all passing through on their way to Germany and other destinations in the E.U. However, the influx has triggered a backlash.

A look at the plan to resettle migrants across Europe

A disused school in southern Sweden that was to house 80 refugees was burned to the ground in a case of “aggravated arson,” authorities there said Saturday. And a leading candidate to be mayor of Cologne was stabbed and seriously wounded Saturday by a man who claimed anti-foreigner motives. Germany’s interior minister said the attack underlined growing concerns over hatred and violence amid the migrant crisis.

Thousands of new arrivals a day have stretched Germany’s capacity to house refugees and other migrants. But Chancellor Angela Merkel said she will not promise “false solutions,” because they will not hold up even for two weeks and will create bigger disappointment that the problem has not been resolved.

“I am working with all my power for sustainable solutions, and they don’t depend on us Germans alone and will take time,” she said.

— Associated Press