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.
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.
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.
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.”
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.
US president Barack Obama said: “Our hearts go out to those who may have been injured. It’s still an active situation and Germany is one of our closest allies so we are going to pledge all the support that they may need in dealing with these circumstances.”
He said it was a “good reminder” that people’s “way of life, our freedoms, our ability to go about our business every day” was dependent on law enforcement.
Charlie Flanagan, Irish Minister for Foreign Affairs and Trade, said he was “horrified” by the attack.
“Our thoughts are with the families and loved ones of anyone affected by this horrific event, and we extend our deep condolences to the German people.
“My department is monitoring the situation and is in close contact with the Irish Embassy in Berlin. At this time we are not aware of any Irish citizens having being caught up in this evening’s incident.
“I urge any Irish citizens in the area to follow the German authorities’ advice to avoid public areas and to stay indoors.”
Shadow foreign secretary Emily Thornberry said: “Our heartfelt thoughts and sympathies are with the people of Munich, and we send our support to the German police, intelligence and emergency services who are dealing with these unfolding and tragic events.
“While it is unclear at this stage how many innocent people have been killed or injured, how many gunmen are involved, or what twisted motivation they hold, we can say one thing with certainty: anyone who tries to commit indiscriminate, mass murder against ordinary men, women and children going about their daily lives stands for nothing but evil.
“Our response cannot be to let them win by changing the way we live, or reacting ourselves with hatred and intolerance. We must stand defiant to protect our way of life, and we must take determined and unified action against anyone who wants to destroy it.”
Hillary Clinton tweeted: “Monitoring the horrific situation in Munich. We stand with our friends in Germany as they work to bring those responsible to justice.”
Donald Trump posted on Facebook: “Our prayers are with all those affected by the horrible attacks in Munich. This cannot continue. The rise of terrorism threatens the way of life for all civilized people, and we must do everything in our power to keep it from our shores.”