They also revealed that the teen responsible for the attack on Thursday had been undergoing psychological counselling.
A search of his bedroom in the city just south of Nuremberg revealed “documents with evidence that he planned the event and include mention of an apocalypse,” senior public prosecutor Gudrun Lehnberger said.
Lehnberger also confirmed that the young man had injured one teacher as well as several of his fellow students at the school.
Meanwhile police and teachers on Friday called for better emergency procedures to handle such school attacks.
Head of the German Police Union (DPOLG), Rainer Wendt criticised insufficient school security and called for a nationwide early warning system.
“The horrifying act in Ansbach unfortunately proves once again that Germany's schools are not secure places,” he told daily Neue Osnabrücker Zeitung. “We finally need comprehensive early warning systems for schools.”
Wendt also said that schools are missing desperately needed social workers and psychologists to help students with their problems before they get out of hand.
“In every German school there needs to be at least one social worker and psychologist,” he told the paper. “The state governments must finally do their homework and invest heavily in schools security instead of calling for stronger laws after every school attack to distract from their school policy failures.”
Meanwhile the president of the German teachers' association (DL), Josef Kraus, also told the paper that schools need more psychological care for students to prevent further attacks, saying the number of psychologists in schools should double.
“We must establish a culture of closer attention,” he said, adding that teachers need to be educated in recognising possible problem students.
On Thursday morning the 13th grade student identified as Georg R. attacked the college preparatory high school Gymnasium Carolinum armed with an axe, knives and several firebombs.
The firebombs he ignited in the attack apparently set off a fire alarm in the school, possibly heading off more carnage as students left the building and a police patrol car quickly came to the scene.
The attacker injured nine – including two girls who were critically wounded – before police shot him five times. He was stopped just 11 minutes after the first emergency call to police. He is in serious condition and has not yet been questioned by authorities.
One of the girls he injured suffered life-threatening axe wounds, but she was reportedly in stable condition on Friday afternoon. The other girl suffered second-degree burns to her body from a firebomb.
Students described Georg R. as a quiet outsider who was teased by girls for his appearance.
The attack comes about six months after a school shooting in the town of Winnenden in March, when 17-year-old Tim Kretschmer shot dead 15 people before dying in a shoot-out with police. There have been several warnings of copycat shootings since, with armed police evacuating schools on several occasions.
In May, a 16-year-old girl was arrested after arriving at a school wearing a mask and armed with several knives, an air gun and a rucksack full of bottles of flammable liquid. She attacked another female student, nearly severing her thumb with a knife.