Multiple shots were fired on Hanauer Street at about 6pm before the attack moved to the Olympia Einkaufszentrum shopping centre in the south German city.
Witnesses told police there were three gunmen, armed with “long-barrelled” weapons, who then escaped. Police were checking last night whether one of the dead was involved in the attack.
They said the attack was being treated as terrorism and warned people to avoid public places as the shooters remained at large.
A state of emergency was declared in Munich with the public transport network shut down, all nightclubs closed and drivers urged to clear motorways.
German president Joachim Gauck said he was “horrified”.
He added: “I am with all the victims in my thoughts and all those who are mourning or fearful for loved ones.” Foreign Secretary Boris Johnson said in a statement that he was “shocked and appalled” by the attacks.
He said: “My thoughts are with those injured and the families of those killed. We stand ready to assist our friends in Germany.
“Our travel advice to UK nationals in the area tonight is to stay indoors and follow the advice of the local authorities.”
The motive for the attack was still unclear last night although there were reports that one of the attackers shouted “I’m German” before firing. The attack happened five years to the day that 77 people were killed in a bombing and shooting rampage in Norway by far right extremist Anders Breivik.
Despite initial reports of several shooting incidents, police said they were concentrating on one scene. Dozens of police vehicles lined the street outside the shopping centre, and a number of armed officers and a helicopter swarmed on the area.
Mobile phone footage emerged of a man with dark hair, wearing a black T-shirt and denim trousers, appearing to take aim at people outside a McDonald’s restaurant near to the shopping centre and subway station.
He is seen raising his arms, apparently holding a shotgun, and firing at people outside the restaurant, who could be seen running for cover. The sound of multiple shots being fired could be heard as shoppers and passers-by ran for cover.
The shopping centre in the northern part of Munich is not far from the city’s Olympic stadium in the Moosach district of the Bavarian capital.
It is the second attack in Germany in less than a week which had left security services on high alert. On Monday, a 17-year-old Afghan wounded four people in an axe-and-knife attack on a regional train near the Bavarian city of Wuerzburg, and attacked another woman outside as he fled. All survived, although one man from the train remains in life-threatening condition. The attacker was shot and killed by police.
The Islamic State group claimed responsibility for the train attack, but authorities have said the teenager is likely to have acted alone.
As rail travel and public transport in the city was halted, refuge was offered to people stranded around the city via social media, under the hashtag #OffeneTur – or #OpenDoor – inviting people to stay if they were unable to get home.
Facebook’s Safety Check feature was also activated so that people can let friends and family know that they are safe.
US president Barack Obama said: “Our hearts go out to those who may have been injured. 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.