A gas explosion in an apartment building in eastern Slovakia killed at least five people Friday. Firefighters said other people are trapped on the roof as the building burns and is in danger of collapse.

The explosion took place in the 12-story building in the city of Presov shortly after noon. Firefighters said the explosion was between the 9th and 12 floors, and several people fled to the roof.

Alena Krcova, a spokeswoman for the rescue services, said dozens of people may have been injured.

A fire burns as a gas explosion severely damaged a 12th storey apartment building in Presov, Slovakia, Friday, Dec. 6, 2019. The firefighters said the explosion occurred between the ninth and 12th storey and witnesses told them several people have escaped to the roof. Authorities didn't immediately confirm any injuries or fatalities. (AP PhotoPolice of SlovakiaHO)

A fire burns as a gas explosion severely damaged a 12th storey apartment building in Presov, Slovakia, Friday, Dec. 6, 2019. The firefighters said the explosion occurred between the ninth and 12th storey and witnesses told them several people have escaped to the roof. Authorities didn't immediately confirm any injuries or fatalities. (AP PhotoPolice of SlovakiaHO)

Slovak Prime Minister Peter Pellegrini is heading for the site.