SPIELFELD, Austria — The small, alpine state of Slovenia became the latest focus of Europe’s continuing migration crisis, when hundreds of migrants were diverted there on Saturday, after Hungary blocked a main transit route by closing its frontier with Croatia.

The Slovenian prime minister, Miro Cerar, said that the army would be used to help deal with the flow of refugees from Croatia, who began arriving at the Slovenian border town of Petisovci and were being transferred to, and then across, the Austrian border.

“I want to emphasize that Slovenia is not in a state of emergency,” Mr. Cerar told reporters in Ljubljana, the capital. “There is a process in place and it is working well, but it’s important that police get the logistical and technical support they need.”

Hungary’s unilateral decision to close its border with Croatia underlines Europe’s collective failure to draw up a coherent strategy to deal with the huge movement of humanity.