At least two girls were seriously wounded and a 16-year-old suspect arrested after an attack Wednesday at a secondary school in southern Germany.
Police spokesman Michael Spessa told AFP the first calls to emergency services about the incident at Welfen grammar school in the town of Schongau came at around 12:50 pm (1050 GMT).
"The police immediately went to the scene with a strong deployment," Spessa said, adding that a "16-year-old boy was taken into custody".
German Interior Minister Alexander Dobrindt told reporters near the scene of the attack that the suspect was a "former pupil at the school" and a citizen of another EU country.
Dobrindt said it seemed the suspect was suffering a "mental health emergency" and that he had already been receiving treatment.
The attacker had been carrying knives and a firearm, which he fired without injuring anyone.
After the firearm malfunctioned he used a knife to injure two schoolgirls, Dobrindt said.
"The teachers and the police officers who had by then arrived on the scene were able to overpower the suspect," he added.
Police said the two girls were both aged 13 and were taken to hospital with serious injuries.
Following updates on their treatment Spessa said "we can cautiously say that the lives are not in danger".
A large group of armed police and a fire engine could be seen outside the school late on Wednesday afternoon and a helicopter was flying above Schongau, a town of 12,000 people just north of the Alps.
Dobrindt said it looked like the crime was a "rampage committed by a lone perpetrator" and the two girls appeared to be "random victims, according to our assessment, who happened to be in his path at that time".
A contact point was set up for parents and relatives of the school's pupils at Schongau's fire station.
Serious violence at schools and other educational institutions is rare but not unknown in Germany.
Last year, a 45-year-old teacher was seriously wounded at a vocational college in the western city of Essen.
The prime suspect, a 17-year-old Kosovar, was shot by police before his arrest.
Prosecutors accuse of him of acting out of "jihadist" motivations.
In January 2022, an 18-year-old German shot dead a student in a lecture hall at the University of Heidelberg and wounded three other students, before turning the gun on himself.
On March 11, 2009, a 17-year-old teenager, Tim Kretschmer, carried out a massacre at his former secondary school in Winnenden, near Stuttgart.
He killed 15 people -- nine students, three teachers and three passersby -- before killing himself.
In 2002, a 19-year-old gunman killed 16 people, including 12 teachers and two pupils, at a school in the eastern city of Erfurt.
bur-jsk/jxb