A masked gunman has been shot dead after opening fire at a cinema in Germany and taking a number of hostages.

Police said there were no serious injuries after the incident at the Kinopolis complex, in the town of Viernheim.

An armed attacker wearing a mask burst in shortly before 3pm local time (2pm BST), with witnesses hearing several shots.

(EPA (EPA)

A police spokesperson said he then took several hostages, who were later freed unharmed.

The Hessen interior minister, Peter Beuth, told the state parliament that the man was shot dead by police after armed units surrounded the cinema.

"The police had an emergency call at 2.45pm. The caller said there was a masked man...armed with a long gun. It is unclear whether it was a real gun," he added.

"The caller heard four shots and said that the masked man appeared a little mentally unstable. Police special forces were called."

A spokesperson for the interior ministry told The Independent there was no immediate indication of a link to terror groups.

The gunman's identity and his motives were unclear but he was an "acute threat," he added.

In pictures: Germany cinema shooting Show all 10 1 /10 In pictures: Germany cinema shooting In pictures: Germany cinema shooting A person escapes from a movie theatre complex Kinopolis, where an armed man reportedly opened fire in Viernheim Getty Images In pictures: Germany cinema shooting Heavily-armed police walk outside the Kinopolis Getty Images In pictures: Germany cinema shooting Police stand outside a parking garage next to a cinema in which an armed gunman reportedly barricaded himself in Vierheim EPA In pictures: Germany cinema shooting Police officers at the scene of the shooting in Viernheim Getty Images In pictures: Germany cinema shooting Police and passers by stand near to a cinema in Vierheim EPA In pictures: Germany cinema shooting German special police leave their car after a masked man with a gun and ammunition belt opened fire in a cinema complex in Viernheim REUTERS In pictures: Germany cinema shooting Police outside a cinema complex in Viernheim Getty Images In pictures: Germany cinema shooting Police officers stand outside the Kinopolis Getty Images In pictures: Germany cinema shooting A policeman runs outside a cinema complex in Viernheim Getty Images In pictures: Germany cinema shooting Police officers stand outside a cinema complex in Viernheim Getty Images

Television footage showed a couple fleeing the building as officers carrying guns and wearing helmets and body armour moved in on Thursday afternoon.

At least 25 people reportedly suffered from the effects of teargas during the operation.

Christiane Kobus, a spokesperson for South Hessen Police, said: “Officers entered the cinema and were able to locate the man and the people he was holding.

"There was a threat situation and the man was then shot dead."