A gunman who murdered nine people and injured 16 others including children at a Munich shopping centre was an 18-year-old German-Iranian, police believe.

Three people remain in a critical condition after the teenager, who has not been named, opened fire in a McDonald's before rampaging through the nearby Olympia-Einkaufszentrum mall on Friday evening.

Police said the victims killed in the massacre included adolescents, while there are children among the 16 people injured.

Investigators suspect the youth, who is thought to have lived in the south German city for more than two years, acted alone before killing himself.

Any motive behind the attack currently remains "totally unclear" and investigations will be "running on all cylinders", Munich police chief Hubertus Andrae said.

Read more: Munich shopping centre attack: Police warn three suspects with rifles still at large as they confirm six dead

Speaking at a press conference in the early hours of Saturday morning he said the attack "makes us speechless and our thoughts go out in particular to the victims".

"As a result of the manhunt with a large-scale operation force we have found a male person, who given the current level of intelligence committed suicide," Mr Andrae said.

"On the basis of witness reports and on the basis of CCTV footage we assume that this person is the suspect.

"We currently have no indications that there were further perpetrators involved. The suspect is, according to the current level of intelligence, an 18-year-old Iranian from Munich."

Mr Andrae said inquiries suggested he had lived in the city for more than two years and is not thought to have been known to law enforcement agencies.

"As to the background or motive of the offence it's totally unclear. The investigations will be running on all cylinders through the night," Mr Andrae said.

Read more: Munich shopping centre attack: Police warn three suspects with rifles still at large as they confirm six dead

A reporter at the press conference asked if a "game" posted on Facebook offering free food at the McDonald's at 4pm on Friday was an attempt to encourage people to congregate at the scene before the attack.

Mr Andrae said the game was "one part of the comprehensive investigation we are conducting".

Police in Munich have appealed to witnesses who filmed the attack on mobile phones to pass the footage on to them.

Unverified clips posted on social media appeared to show a man shouting slogans. Another appeared to show people running for their lives as a man opened fire on pedestrians.

Munich police also urged that pictures of the victims were not shared on social media or reproduced.

The force first received reports of a shots being fired near the north Munich shopping centre at around 5.50pm local time on Friday evening.

The attacker opened fire in the McDonald's on Hanauer Street with a weapon thought to have been a handgun.

From there the suspect moved into the shopping centre where the killed and injured were hit, police said.

Armed units flooded the area, with officers in plain clothes seen running through the mall in search of the gunman.

His body was found in a side street close to the shopping centre at around 9.30pm local time.

In the wake of the hunt police said they believed the teenager had committed suicide, although Mr Andrae said a post-mortem was needed to see if he died as a result of officers' gunfire.

Officers recovered weapons with "relatively large" magazines at the scene, contrary to earlier suggestions that long-barrelled guns were used.

Read more: Munich shopping centre attack: Police warn three suspects with rifles still at large as they confirm six dead

Mr Andrae also dismissed earlier fears that there were up to three gunmen involved in the attack triggered by two bystanders fleeing in a car at "considerable speed".

There were reports of people barricading themselves in shops in the shopping centre as the attack unfolded and Munich was put into lockdown.

People out on the streets were urged to run and find refuge, public transport was shut down and motorists were told to clear the city's roads and motorways to give clear passage for the emergency services.

Locals offered their homes as safe havens using the hashtag #OffeneTur - or #OpenDoor and invited people left stranded by the emergency response to stay.

Around 2,300 police officers were deployed on the city's streets and specialist counter-terror units were flown in. Police forces in neighbouring Austria and Switzerland also sent officers to assist.

Munich police eventually gave a "cautious" all-clear at around 1:30am local time.

Mr Andrae said there was no evidence to give fear of further attacks, but warned the threat remained present.

He said: "At the moment we have no intelligence that this brutal and violent act should give rise to a feeling of insecurity. But one should add, and this is not a new insight, there is no such thing as absolute safety and security, but we have no further indication that there is reason to feel insecure or unsafe or to hide away."

Read more: Munich shopping centre attack: Police warn three suspects with rifles still at large as they confirm six dead

The killings come after a 17-year-old Afghan asylum seeker launched an axe and knife attack on passengers on a train in Wuerzburg, southern Germany on Monday.

Islamic State claimed responsibility for the attack in which five people were injured. The teenage axeman, Riaz Khan Ahmadzai, was shot dead by police.

Friday's Munich attack took place eight days after more than 80 lives were lost when a lorry ploughed into crowds watching a Bastille Day firework display in Nice, France. IS said it was also responsible for the attack by 31-year-old Mohamed Lahouaiej Bouhlel.