At least one person was injured on Thursday during a shooting at a secondary school in the city of Bremerhaven, northern Germany.
Police detained the suspected gunman after the incident in which one person, reportedly a woman member of staff, was severely injured. She was rushed to a local hospital for treatment, German newspaper Bild reported.
The shooting took place at about 9.15am at the Lloyd Gymnasium, where a schoolgirl heard shots being fired while she was in a bathroom and called the police.
About 1,700 pupils attend the school but only about 200 were in the building at the time of the shooting as exams were taking place.
Teachers and pupils barricaded themselves into classrooms while they waited for help. A photo shared online appeared to show a teacher holding a chair against a door while children sat at their desks.
Specialist firearms officers were called in to conduct a search of the school to ensure no other perpetrators were in the building.
“The armed person has been arrested and is in police custody,” Bremerhaven Police said in a statement.
“The students are in their classrooms with their teachers. The police have the situation on site under control,” the statement added. “Police measures are continuing.”
The suspected gunman was carrying a pistol at the time of the arrest, Bild reported.
A video posted on Twitter showed a man lying face down on the pavement next to what appeared to be a crossbow or a similar weapon. He can be seen placing his arms behind his back as pedestrians and cyclists passed him and sirens rang out in the distance.
One man who walks by can be seen kicking the weapon to the side.
Within seconds, two police vans arrive and officers jump out to arrest the man lying on the pavement.
Police said a large operation was under way in the centre of the city and urged people to avoid the area around the school.
Photos from the scene showed media, police and emergency vehicles outside the school. A pastor and a Red Cross team were also on site, reports said.
A hotline was immediately set up for parents to obtain information about their children’s safety. A handful of parents gathered outside the school shortly after the news broke, local media reported.
City authorities set up a service offering psychological help to pupils and parents.
The school also posted a message on its website, saying: “Dear parents, your children are safe.”
Cristin Waerner, a pupil who was inside the school during the attack, described panic in the classrooms.
“I was scared quite a bit,” she said. “I was in the ambulance afterwards because I hyperventilated and almost fainted and had to throw up.
“I was definitely scared — we were all sitting up there and talking to our mothers on the phone, everyone was crying and had actually already given up on life.”