BUDAPEST, Hungary — 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.”

A spokesman said early Saturday in the border village of Zakany that several hundred migrants who reached the border minutes before midnight 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.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.