Twenty-five people were injured, four of them severely, when an explosion destroyed an apartment building in the western German city of Wuppertal, police said Sunday.

Police said the explosion rocked the several-story building shortly before midnight Saturday with a large bang, scaring people in surrounding homes so much they ran out into the street in a panic. The detonation was so severe it destroyed the building's attic and the top three floors, the German news agency dpa reported.

Fire then broke out in several different parts of the apartment building and firefighters had trouble dousing the flames because parts of the building kept collapsing. They were able to rescue four severely injured from inside the building and sent them to the hospital. Another 21 people were slightly injured and treated by emergency staff at the scene.