(CNN) A 28-year-old man has been charged after five teenage girls died in a fire Friday afternoon while celebrating their friend's birthday at an escape room in Poland, officials said.

The suspect, who has been identified only as Miolsz S., has been charged with "deliberately creating the danger of a fire in the escape room" and "unintentionally causing the death of people in a fire," CNN Polish affiliate TVN24 reported Ryszard Gasiorowski, a spokesman for the Koszalin district prosecutor, as saying.

Police and fire officials are still trying to figure out how the room caught fire, killing the 15-year-old girls and causing one other person to be hospitalized with severe burns, according to TVN

"We join the families of the victims in their grief. The fire broke out at 5 in the afternoon in one of the escape rooms in Koszalin. There have been five victims, five young victims. We have provided psychological, psychiatric care to the families," Koszalin Mayor Piotr Jedlinksi told TVN.

An escape room is a venue where a group of people are locked inside and try to find a way out by searching for clues as part of a game.

Read More