The gunman who killed nine people in a shooting spree at a shopping centre in Munich has been identified by police as David S.

Police say they believe the gunman is an 18-year-old German-Iranian who was not known to them and had no criminal record.

Local media have named the shooter as Ali David Sonboly.

Investigators suspect the youth, a student who was born and raised in Munich, acted alone before killing himself around 1km from the scene of the attack at the Olympia shopping centre (OEZ).

Munich police chief Hubertus Andrae told a news conference there are no indications the gunman had links with Isis, identifying the attack as a "classic shooting rampage" and not terrorism.

Mr Andrae said the crime and perpetrator had "absolutely no" link to the issue of refugees.

Video shows the moment gunman opens fire in Munich

He said the shooter had been in psychiatric care where he was treated for depression.

Prosecutor Steinkraus Koch told the news conference the suspect had a book titled: "Why Kids Kill: Inside the Minds of School Shooters."

Shoppers are evacuated from the mall yesterday where the attack happened (AFP)

Police said the victims killed in the massacre included teenagers, with children among the 16 people injured.

Video uploaded to social media purportedly shows the attacker shouting "I am German" and "I was born here" after an onlooker shouts xenophobic remarks to him during the attack.

Flowers are placed near the Olympia shopping mall, where nine people were killed in Munich, Germany (Michael Dalde/Reuters)

Peter Beck, a Munich police spokesman, said officers were still collecting evidence at the scene of the crime Saturday morning.

"With regard to the suspect we have to examine everything, but we don't know yet what triggered the crime," Beck told The Associated Press.

He declined to confirm reports by German daily Bild that officers had raided a home in the city's Marxvorstadt district about 2 kilometers (1.2 miles) from the mall and were interviewing the suspect's father, citing "ongoing police operations."

Mr Beck said the number of people receiving hospital treatment stood at 16, three of whom were seriously wounded.

A neighbour on Dachauer Strasse that was searched by police on Saturday morning described the alleged gunman as "very quiet".

Wishing to only give his first name, Stephan, an owner of a coffee shop, told the Press Association: "He only ever said 'hi'. His whole body language was of somebody who was very shy."