A 23-year-old man admitted yesterday to stabbing to death one of the teachers at his former school in an attack that sparked a major police operation, authorities said.

The man, armed with a pistol and a hunting knife, said he had killed the teacher at a training college in Ludwigshafen in southwestern Germany because he was angry about being given "bad marks", a prosecutor said.

The attack saw armed police commandos rush to the college as its 3,200 students were evacuated in the latest in a string of similar incidents in Germany.

"The accused has admitted attacking the 58-year-old teacher," state prosecutor Lothar Liebig said after the man was arrested.

"He said his motive was because of the great anger he felt towards this teacher for giving him very bad marks."

Police arrived at the training college after a fire alarm was set off and found all the students assembled in the playground. They were told that an armed man was on the loose.

"They went up to the third floor and saw a man fleeing, shooting his handgun. The four police, guns drawn, told him to drop his weapon... which he then did," Franz Leidecker from Rhineland-Palatinate state police said.

Police later found the teacher lying seriously injured on the cellar steps of an adjacent building.

"He was still alive, but obviously badly hurt. He died short-ly afterwards," Mr Leidecker said.

Prosecutors said the weapon was a blank-firing pistol. The 23-year-old, who has not been identified, is to appear before an investigating judge today on suspicion of murder, Mr Liebig said.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.