Hegyeshalom, Hungary (CNN) The directions from police were terse: "Follow us."

Hundreds of refugees from the Middle East made the final leg of their trip through Hungary on foot, walking the 4 kilometers (2.5 miles) to the Austrian border in the middle of the night, unsure of what was going to happen to them when they got there.

After a train ride from the Croatia-Hungary border, about 300 to 400 people were trekking through the dark early Sunday with Hungarian police as their guides through the village of Hegyeshalom.

It had already been a long day for the refugees. They had been on the train since the morning. There was very little food or water. When they stepped off the train, they had no idea where they were or where they were going.

A CNN crew with the group was able to provide some information about their location.

The progress of refugees through the country came as Croatia and Hungary fought over what to do with the thousands of people seeking refuge.

On Saturday, Croatia condemned officials in Budapest for stopping a train carrying migrants that had crossed from Croatia into Hungary on Friday.

Croatia called it "incomprehensible because none of the refugees wanted to stay in Hungary."

Croatian Prime Minister Zoran Milanovic said he hadn't discussed the train with his Hungarian counterpart before it headed toward Hungary.

"No, we forced them" to accept the migrants, Milanovic said. When asked how, he said, "By sending the migrants there."

Hungary called Croatia's conduct "utterly contrary to European law," a government statement said Saturday, and Hungary planned to send Zagreb a letter of protest.

Moving along

Hungarian government spokesman Zoltan Kovacs told CNN on Saturday that migrants and refugees were being put on buses and trains and taken to three registration locations near the Austrian border.

The Hungarians weren't able to register many of them because they refused to fill out the paperwork, he said.

The refugees would get food and medical assistance at the three sites, where there also were temporary shelters, Kovacs said.

Hungary on Saturday accepted 18 buses of refugees from Croatia, the Croatian government said on Twitter. Slovenia accepted eight buses, it said.

Kovacs told CNN that Hungarian officials are receiving the migrants "continuously through the day and will handle all of them."

Croatia's anger

Earlier this week, Croatia had welcomed migrants . But as the trickle of people became a rush, things changed. On Thursday, Croatia closed seven of its border crossings with Serbia.

More than 20,700 migrants have entered Croatia as of midday Saturday, the government said on Twitter. The U.N. refugee agency says Croatia is prepared to handle only 500 migrants a day.

20,737 #refugees entered Croatia by 11am. 2,500 of them are currently in Tovarnik. #refugeescrisis — Vlada R. Hrvatske (@VladaRH) September 19, 2015

"Croatia will not be turned into Europe's refugee center," Milanovic said Saturday.

"How convenient this must be for some in Northern Europe to say well, these migrants are now in Croatia -- have the hundreds of thousands of people stay there. That's impossible. Not only is it impossible because of our incapacity to house so many people, but also these people would rebel. The only way is for us to let them pass through in a civilized manner."

Hungary's fence

Meanwhile, Hungary finished building a barbed wire fence along part of its border with Croatia, Kovacs said Saturday.

The fence stretches 41 kilometers (25 miles) and represents the first phase of construction, he said. A barrier along the remaining 330 kilometers (205 miles) of the border will be built in a second phase "if needed."

Refugees began streaming into Croatia on Wednesday after Hungary shut its border with Serbia and erected a razor-wire fence there to halt the flow.

More than 200,000 migrants have arrived in Hungary this year, the Prime Minister's office said Saturday, and 172,000 of them have submitted asylum applications.

The country has called the situation untenable.

With an official response that has included tear gas and water cannons , Hungary has built a reputation as one of the most heavy-handed -- and some say cruel -- European countries dealing with the influx of migrants and refugees.

This little refugee kid crying after Hungary police use tear gas& water canons 2 disperse migrants on Serbia border pic.twitter.com/oIQ4WQlgqt — gultuysuz (@gultuysuz) September 16, 2015

Arrivals in Austria

It appeared Saturday that Hungarian authorities were moving migrants on into Austria in large numbers.

Some 7,000 migrants crossed into Austria from Hungary since midnight Friday, Austrian Interior Ministry spokesman Alexander Marakovits told CNN on Saturday. The refugees came through the Austrian border crossings of Nickelsdorf on the northern end and Heiligenkreuz im Lafnitztal to the south, he said.

At the train station in Gyor, Hungary, halfway between Budapest and Vienna, aid workers said as many as 3,000 migrants and refugees arrived at 7 a.m. Saturday on buses from the Croatian border. They boarded trains in the direction of Austria.

European countries are seeing a constant stream of people from Syria, Iraq and Afghanistan, where armed conflict has pushed millions from their homes. The migrants also come from Turkey, Jordan and Lebanon, where refugee camps are overflowing and the World Food Program has cut food rations for lack of funding.

Many are ultimately looking for pathways to Germany.

Germany's new barriers

Germany let in tens of thousands of people early on, but even if migrants make it there, they now could encounter closed borders. Lawmakers in Germany are working to make it easier to deport quickly those who don't achieve refugee status, German public television broadcaster ARD has reported . They are also looking to cut the level of aid provided to refugees in Germany.

Aid workers say Europe is facing its largest refugee and migrant crisis since World War II.

The European Union is struggling to figure out how to distribute 160,000 migrants -- and whether to set quotas for member countries to absorb them.

Time is running out for #Europe to resolve refugee emergency http://t.co/i0SJEHo7Oh pic.twitter.com/ITarOgsitu — UN Refugee Agency (@Refugees) September 19, 2015

Eastern European countries in particular have shown resistance to committing to a quota.

Switzerland said Friday that it would take 1,500 refugees registered in Italy and Greece if the EU can decide on an overall relocation program.

The dangerous Mediterranean

People desperate to flee upheaval in Africa are also contributing to Europe's immigration crisis. They head for the Mediterranean -- often through Libya, perceived as an open door because its deteriorating security -- and onto crowded, unseaworthy boats operated by smugglers promising passage to Europe.

Many never make it across the dangerous waters.

#Hungary: 6yr-old #Syrian survivor drew our us how their ship drowned on the Med. EU must act now to solve the crisis pic.twitter.com/9AoZkPAGxj — UNHCR Central Europe (@RefugeesCE) September 19, 2015

On Saturday alone, 4,343 migrants were rescued in 20 operations via ships from countries and aid groups in the Mediterranean, the Italian coast guard said.

Doctors Without Borders said four boats rescued 776 people Saturday off Libya. The aid group is working with the charity Migrant Offshore Aid Station, which rescued 301 of the migrants, many with injuries they suffered in Libya.

A record 432,761 migrants have crossed the Mediterranean so far this year, the International Organization for Migration said this week.