BERLIN — A masked man was shot dead Thursday after entering a movie theater in southwestern Germany with a weapon and taking several hostages, authorities said. No one else was injured.

An armed man entered the Kinopolis movie theater in the early afternoon in the town of Viernheim and apparently fired a gun, police spokesman Bernd Hochstaedter told n-tv television.

Police shot and killed the suspect about three hours later, Hesse Interior Minister Peter Beuth said.

“We believe that there were no injured people, and that the people who were in the cinema with the perpetrator could be freed uninjured,” he said.

A police spokeswoman at the scene, Christiane Kompus, told The Associated Press that she had no information on the assailant’s identity and motives.

She said the man had been holding several hostages, but didn’t have a precise number.

Beuth said it wasn’t clear whether the weapon was real. He told the regional legislature in Wiesbaden that the man was masked and that apparently four shots were fired.

Beuth said the man had given a confused impression, news agency dpa reported.