A German-Iranian teenager who shot dead nine people in Munich was a deranged lone gunman obsessed with mass killings who drew no inspiration from Islamist militancy, police say.
The man who German media named as Ali David Sonboly, an 18-year-old local, opened fire near a busy shopping mall on Friday evening, triggering a lockdown in the Bavarian state capital.
Seven of his victims were themselves teenagers, who police said he may have lured to their deaths via a hacked Facebook account on what was the fifth anniversary of twin attacks by Norwegian mass murderer Anders Breivik that killed 77 people.
The Munich shooting, in which a further 27 people were wounded, some seriously, was the third act of violence against civilians in Western Europe - and the second in southern Germany - in eight days.
Bavarian state crime office president Robert Heimberger said Sonboly was carrying more than 300 bullets in his backpack and pistol when he was later found dead of a gunshot wound.
Following a police search of Sonboly's room, where a book on teenage shooting sprees was discovered, Munich police chief Hubertus Andrae all but ruled out an Islamist militant link in the attack.
"Documents on shooting sprees were found, so the perpetrator obviously researched this subject intensively."
The gunman had spent time in psychiatric care, and there was no evidence to suggest he had had an accomplice, Mr Andrae said.
Interior Minister Thomas de Maiziere said it was also too early to associate the Munich shootings with Breivik, who in 2011 shot dead 69 attendees at a youth summer camp hours after murdering eight others by detonating a van bomb in Oslo.
Robert Heimberger, president of the Bavarian state criminal agency, told the news conference police were investigating findings suggesting Sonboly invited people to a fast food restaurant at the mall via the Facebook account.
Turkey's foreign minister said three Turkish citizens were among nine people killed in the Munich attack while Greece's foreign ministry said one Greek was among the dead.
According to foreign media reports, there were also three Kosovo Albanian victims.
Police commandos raided an apartment in the Munich neighbourhood of Maxvorstadt early on Saturday, where a neighbour told Reuters Sonboly had lived with his parents for about four years.
In his room, police found a German translation of a book entitled Why Kids Kill - Inside the Minds of School Shooters.
Asked if Sonboly had deliberately targeted young people, Munich police chief Mr Andrae said that theory could be neither confirmed or ruled out.
Bavarian Interior Minister Joachim Herrmann said there were several signs he had been suffering from "not insignificant psychological troubles".
Three of his victims were 14 years old, two were 15, one was 17 and one 19. The others were 20 and 45, the police chief said.
Police will also have to find out how the 18-year-old obtained the firearm in a country whose gun control system is described by the US Library of Congress as being "among the most stringent in Europe".