BIHAC, BOSNIA-HERZEGOVINA - Not so long ago, people in Bosnia were sarcastically joking that their war-scarred country is in such a bad shape that not even the migrants fleeing violence and poverty in the Mideast and Africa were willing to pass through it.
That's not the case anymore.
As previous migration routes to Western Europe from the Balkans have closed off over the past year, the trail has shifted toward Bosnia. Now the impoverished nation is trying secure proper shelters for at least 4,000 people expected to be stranded in its territory throughout the coming winter.
Peter Van der Auweraert of the International Organization for Migration says it's a race against time.
"We have to accelerate the process, because the danger is that when the first snow falls, we will have people sleeping outside in conditions that even in summer were already not acceptable," he said.
Since the beginning of the year, close to 11,000 migrants and refugees have entered Bosnia, which has never truly recovered from its brutal 1992-95 war, which left more than 100,000 dead and forced more than half the population to flee before a peace deal was brokered.
That compares to just 755 migrant arrivals for all of 2017.
Bosnian authorities have increased border controls along its northeastern border with Serbia, but between 400 and 500 migrants are still entering Bosnia weekly.
Most end up living in horrible conditions in the northwestern Krajina region on the border with European Union member Croatia, which shares a 1,000-kilometer (620-mile) border with Bosnia.
Thousands have been staying in an abandoned dormitory, a windowless, roofless concrete building on the edge of Bihac, and in tents in the woodlands surrounding it. In the nearby cities of Velika Kladusa and Cazin, smaller groups of migrants have set up squalid makeshift camps where they spend days curled up on the ground, cooking simple meals over open fires and watching their children play in the dirt.
Local Red Cross volunteers have been providing food for migrants and refugees in Bihac since April. At first, they fed just a few hundred people, relying on local donations. But since July, they have been serving two meals a day to 1,500 migrants who are also receiving basic health care from local medical workers.
Although the U.N. refugee agency and the IOM have now joined the effort, local volunteers are desperate for more help.
"We are reaching the end of our rope, because this has been going on for four months already. Only God knows what awaits us in the future," said Abdulah Budimlic, head of the Red Cross organization in Bihac.
While around 60 percent of those who entered Bosnia this year have managed to cross into Croatia, more and more migrants in Bihac and Velika Kladusa have accused Croatian police of beating them, confiscating their meager belongings and pushing them back into Bosnia.
Croatian police have repeatedly denied those claims.
"They take your mobile phones, your power pack. They destroy these and say `Don't come back,"' said Abdul Hai Baloch from Pakistan's volatile Balochistan province.
Amjad Dakkakn, a 25-year-old from Syria, echoed the sentiment, swinging his fists to illustrate how he was treated by Croatian border guards, calling them thieves for smashing his phone and taking his money.
"They are hitting us as they hit an animal," claimed AbuBakar Khan, a 20-year-old from Pakistan who has made several unsuccessful attempts to cross the border since arriving in Bihac about a month ago.
Having lived through their country's brutal 1990s war, Bosnians sympathize more than most with those fleeing their homes in search of a better, safer life. But they are growing more vocal in their criticism of the national government, accusing officials of forcing towns and villages to deal with the migrants' many needs on their own.
"In less than a month, the weather will change. It will get cold," said Bihac resident Halid Dedic. "I fear that the local people will be left alone to face the migrants."
Bosnian Security Minister Dragan Mektic hopes the pressure will be eased after the EU pledged 6 million euros ($6.9 million) earlier this month to help Bosnia with the unprecedented migrant influx. It comes on top of 1.5 million euros ($1.7 million) Bosnia already received from the EU in June for migration-related needs.
"Now that the EU had provided us with this substantial donation ... I believe we will have enough time to set up proper reception centers where migrants can spend the winter and be treated humanely," Mektic said.
Those better conditions can't come soon enough for the migrants in Bosnia.
"I just want a safe life, to work and live like normal people," said Khan, but he appeared resigned to the fact he probably will spend many months in Bosnia under the "very worst" conditions before he is able to leave.
"[The EU] needs to fund Bosnia to prepare camps here and to protect refugees," he said.