German special forces have shot dead an armed, masked man who took dozens of hostages in a multiplex cinema in the western German state of Hesse.

The man entered the Kinopolis complex in Viernheim, near Mannheim, around 2.45pm but was shot dead after a short standoff with German police who stormed the complex.

After the alarm went out a police spokeswoman said the area around the cinema was sealed off.

“My [police] colleagues located one armed person with the hostages, the hostages could be freed uninjured,” said Christiane Kobus, police spokeswoman in southern Hesse.

“This was a threatening situation for my colleagues and a gun was discharged and the perpetrator is dead.”

Eyewitnesses told local media the man was wearing a mask, carrying a gun and munition belt and fired four shots as he entered the cinema.

“We just saw people running out of the Kinopolis,” said eyewitness Mareike Merseburg to local radio station YOU FM.

With Germany enjoying temperatures over 30 degrees, the cinema was largely empty with only about 50 customers, according to other eyewitnesses.

Police dismissed initial local media reports that special forces used CS gas that had left 25 hostages injured. Another police spokesperson, Bernd Hochstaedter, confirmed there had been no injuries during the three-hour standoff.

Cinema employee Guri Blakaj told Reuters the man appeared to be aged between 18 and 25.

The police spokesman said the armed man gave a “confused” impression and security sources told Germany’s DPA news agency they did not believe the perpetrator was a terrorist.

Hesse’s interior minister Peter Beuth confirmed in the state parliament that the armed man was dead but was unable to confirm whether the man’s gun was loaded.

Additional reporting: Reuters