Migrants protect themselves from the rain as they walk to enter Slovenia from Croatia on Monday.Srdjan Zivulovic / Reuters

Updated on October 19 at 3:34 p.m.

Thousands of refugees and migrants were stranded in Serbia on Monday after Hungary sealed off a border for the second time this year.

Hungary has constructed razor-wire fences along its borders with Serbia and Croatia to prevent the entry of people who have fled their homes in the Middle East and Africa and entered Central Europe in record numbers. The fence along the border with Serbia went up in September, leading migrants and refugees to turn to Croatia to continue their journey northward. The barrier along the Croatian border went into effect early Saturday.

The latest closure has forced refugees west; on Saturday, 5,000 people entered Slovenia, which says it will accept 2,500 refugees per day. The closure has also created a huge bottleneck along Serbia’s border with Croatia.

“It is like a big river of people, and if you stop the flow, you will have floods somewhere,” Melita Sunjic, a spokeswoman for the UN High Commissioner for Refugees, told Reuters of the backlog. “That’s what’s happening now.”

More than 10,000 people entered Serbia from Macedonia on Sunday, according to the UN refugee agency, Reuters reported. Early Monday, 6,000 were stranded along the Serbia-Croatia border after a cold night of rains. By Monday night local time, Croatia had opened its border with Serbia, allowing people to pass through, according to Sunjic.

UNHCR reported a shortage of food and blankets in the area. Reuters photos showed some refugees burning shoes to create bonfires to warm themselves. Many were “out in the open, they cannot sleep on the ground because of knee-deep mud,” says Sunjic. One doctor in Serbia said some were suffering from hypothermia. “We don’t have a chance to treat; we don’t have the actual medicine to be given out; we don’t have any more raincoats,” he told the BBC. At least 2,000 people had slept on a train held on the Croatian side of the border.

Central European countries are passing around the blame for the bottleneck. Slovenia says Croatia ignored its quotas for migrants and is transporting large groups of people to their border. Croatian officials say Slovenia has changed several times the number of migrants it says it is willing to accept, and accuse Greece of not doing enough to slow the flood of people entering the region. Serbia quarreled with Croatia last month over the latter’s border restrictions, which have since been lifted. And Hungary blames pretty much everyone.

The bottleneck is expected to only get worse. More than 5,000 people cross into the region from Greece every day.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.