ZAGREB (Reuters) - A group of migrants who had marched for two days from the Serbian capital Belgrade were stopped on Sunday at the border with Croatia, a European Union member which said would not allow illegal crossings.

A migrant child walks towards the border crossing with Croatia near the village of Berkasovo, Serbia, October 12, 2015. REUTERS/Antonio Bronic/File Photo

Some 150 migrants, reported as being mostly from Afghanistan and Pakistan, left Belgrade on Friday to walk about 125 km (80 miles) to the Croatian border, demanding free and secure passage to Western Europe.

Due to exhaustion and cold weather, some decided to give up the march, media reported.

But most of them, arriving at the Serbian border town of Sid, said they would wait until the frontier with Croatia was opened and refused to be accommodated in the reception center.

“There is not a single reason why anyone should enter Croatia illegally. Croatian police will protect the border from such attempts,” Croatia’s Interior Minister Vlaho Orepic said on Sunday after a visit to the Tovarnik border crossing near where a group of migrants was stranded on the Serbian side.

According to the U.N. refugee agency, around 6,400 migrants from countries such as Syria, Iraq, Pakistan and Afghanistan are currently registered in Serbia, a candidate for EU membership.

Local non-governmental organizations say their number is close to 10,000 and they mostly arrived from Bulgaria and Macedonia.

Last month, another group tried a similar march toward the Hungarian border but eventually decided to return to Belgrade. Hungary, another EU member, has practically sealed its borders to migrants.

Last year, a total of 579,518 migrants and asylum seekers were registered arriving in Serbia, out of more than a million who made it to Europe by land and sea.

A deal between Turkey and the European Union, struck in March, has largely shut off the flow of people reaching Greece and the Balkans. Austria began consultations with Balkan states this month to see what measures can be taken if the deal collapses.