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 said on Saturday.

The 18-year-old, born and raised locally, 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.