BERLIN - Shots were fired at a German school in the northern city of Bremerhaven on Thursday and one person, who was not a student, was wounded, police said, adding an armed person had been taken into custody.

On its website, the Lloyd Gymnasium, which has around 1,150 students, posted a notice saying: "Dear parents, your children are safe." It gave a phone number that parents could call for further information.

German daily Bild said the injured person, who has been taken to hospital, was a woman. That could not immediately be confirmed.

The newspaper said that a second suspect appeared to be on the run following the shooting, but police said on Twitter that its investigation indicated there was only one perpetrator.

The police did not give any details of the person who was detained.

Online newspaper Nord24 said a schoolgirl who heard shots had called the police. Students barricaded themselves in their classrooms, it added.

Police said later the students and teachers had been able to leave the building after special forces searched the building.

(Additional reporting by Kirsti Knolle; Writing by Paul Carrel; Editing by Maria Sheahan, Nick Macfie and Barbara Lewis)