The Latest: Hungary shuts down migrant flow on Croatian border 'to protect Hungary and Europe'

Razor wire is carried on a train wagon to be used as border closure between Hungary and Croatia, at the railway station in Zakany, 230 kms southwest of Budapest, Hungary, Friday, Oct. 16, 2015. Hungary clamped down on its border with Serbia with a barrier on Sept. 15 and says it will close down its border with Croatia to migrants starting at midnight. More than 383,000 migrants have entered Hungary this year, nearly all passing through on their way to Germany and other destinations farther west in the EU. (Gyorgy Varga/MTI via AP) (The Associated Press)

Migrants are seen on a train at the railway station in Zakany, 230 kms southwest of Budapest, Hungary, Friday, Oct. 16, 2015 after they crossed the Hungarian-Croatian green border. Hungary will close its green border to Croatia at midnight. (Gyorgy Varga/MTI via AP) (The Associated Press)

Migrants and refugees walk towards Austria at the former border station of Hegyeshalom, at the Austrian border, 169 kms west of Budapest, Hungary, Friday, Oct. 16, 2015. International Organization for Migration said that more than 600,000 people had arrived by sea into Europe this year and more than 3,000 of them died trying to reach Europe to escape war or poverty. (Balazs Mohai/MTI via AP) (The Associated Press)

The Hungarian government says it has shut down its border with Croatia to the free flow of migrants "to protect the citizens of Hungary and Europe."

Government spokesman Zoltan Kovacs said early Saturday in the border village of Zakany that several hundred migrants who reached the border minutes before midnight (2200GMT) would still be allowed to enter Hungary for humanitarian reasons.

Hungary has built a razor-wire fence on the border with Croatia, mirroring a similar barrier finished last month on its border with Serbia. Both fences are meant to prevent migrants from freely entering the country while trying to reach Germany and other destinations in the European Union.

Croatia said it would begin taking migrants to its border with neighboring Slovenia to circumvent Hungary, from where they could continue their journey west.

More than 383,000 migrants have entered Hungary in 2015.