With hundreds of refugees crossing into the German city of Hamburg on a daily basis, the city has passed a law that will allow for the seizure of empty commercial buildings to house people seeking asylum, the BBC reported. The law, which goes into effect next week, comes as temperatures drop, making it dangerous for refugees to continue sleeping outside or in tent camps.

City officials said the law was a temporary measure and that property owners would receive compensation. Property would be seized only if the owners were unwilling to have their space used in return for compensation. No residential properties will be used as part of the law.

Officials estimate that 500 refugees are entering Hamburg daily. The fellow north German port city of Bremen also is considering a similar measure to deal with a housing shortage that has left officials across Europe scrambling for solutions.

Refugees are fleeing war-torn and repressive states including Syria, Iraq, Afghanistan and Eritrea. More than 2,800 have died undertaking dangerous Mediterranean crossings so far this year, according to the International Organization for Migration. Germany has said it expects more than 800,000 refugees to arrive this year alone.

Hamburg’s decision comes as EU-member governments continue to struggle with the influx. German Chancellor Angela Merkel’s popularity rating has shrunk to the lowest level seen in four years at 54 percent, Reuters reported. Her rating was currently lower than during the 2011 eurozone crisis. More than 50 percent of survey respondents said they were concerned about the high numbers of refugees arriving in Germany.

EU countries have gotten creative to house refugees by looking for unused buildings and large spaces. Greece opened the Galatsi Olympic Hall that was built for the 2004 Olympic Games in Athens Thursday. The hall was used for table tennis and rhythmic gymnastics and was now expected to house about 500 people, mainly from Syria and Afghanistan, the Associated Press reported.

In Bavaria, Germany, the city of Franconia said it was planning to build modular units with the expectation that they would house refugees for approximately 10 years.