Around 80 people in Germany's western city of Essen were told to evacuate during the night as their homes were deemed unsafe, the local fire service said on Saturday.
An 8-story building was vacated due to serious concerns about a former coal mine tunnel, which lies underneath the flats.
The buildings are located in Essen's Freisenbruch district.
Disused tunnel poses serious risk
Fire service spokesman Nico Blum said an opening within the tunnel that was previously used for ventilation was found not to have been sufficiently filled in with concrete.
Blum said the safety of the homes could no longer be 100% guaranteed.
An operation began around 10 p.m. local time (2000 UTC/GMT) on Friday to move the residents and took until 3 a.m. local time on Saturday.
"Around 30 people have been housed in emergency accommodation," Blum said.
The others were taken in by friends and relatives.
WDR said residents had to quickly pack any essential belongings and leave in vehicles provided by authorities in the middle of the night.
The broadcaster cited one resident saying she was given just 15 minutes to collect what she needed and evacuate the building.
A specialist company will now be contracted to fill the tunnel with concrete.
The fire service spokesman said it would take weeks before residents can return home.
Coalfields in transition
Several thousand kilometers of mine shafts and tunnels run underground in Germany's Ruhr region, formerly the country's industrial heartland.
The Ruhr played a key role in the former West Germany's economic miracle after World War II which saw economic growth of 9% GDP per year and a heavy demand for coal and steel.
As a result of increased competition from abroad and the 1970s energy crisis, German coal became uncompetitive and the sector — along with other industries — went into sharp decline.
The former mining heartland sees occasional building collapses, including from sinkholes created by decaying underground tunnels.
In 2000, two garages and a car sank into a 500-square-meter (5,382-square-foot) crater, which appeared in a residential area of Bochum, a city around 12 kilometers (7 miles) west of Essen.
The incident was blamed on a disused mining shaft.
Another sinkhole appeared in 2004 in Siegen, which lies west of Cologne and Bonn.
The corner of a house and two bikes fell into the crater and several dozen residents had to be evacuated.
mm/rm (dpa)