The teenage gunman who killed nine people and wounded 35 more in Munich on Friday had been planning the attack for a year.
Ali David Sonboly, an 18-year-old German of Iranian descent had also received psychiatric treatment as recently as June, police said.
“From what we know at this point of the investigation and from analysis of his computer and other documents the suspect had already been planning this attack for one year, that means since last summer,” Bavarian state criminal police President Robert Heimberger told a news conference.
Heimberger also said that the teenager had visited the site of a previous school shooting in the German town of Winnenden and taken photographs.
Sonboly bought a reactivated Glock 17 pistol online, via the so-called dark net to launch the attack at a Munich’s Olympia shopping centre.
He took his own life following the attack.