A shooting at a Munich shopping centre which left nine people dead was carried out by one gunman who then killed himself, German police have said.
The suspect was an 18-year-old German-Iranian dual national who lived in Munich, police told a news conference, but his motive is unclear.
Sixteen people were injured, three critically, police added.
A huge manhunt was launched following reports that up to three gunmen had been involved in the attack.
The body of the suspect was found about 1km (0.6 miles) from the Olympia shopping centre in the north-western suburb of Moosach.
Munich police chief Hubertus Andrae told the news conference early on Saturday that the suspect had not been known to police and there were no known links to terror groups, although investigations were continuing.
The reports of three suspected attackers came when witnesses saw two people leaving the scene in a car “at considerable speed”, but they were later confirmed not to be involved, he added.
“The motive or explanation for this crime is completely unclear,” he said.
Mr Andrae also said that children were among the casualties, but gave no further details.
Following the attack, the Bavarian capital’s transport system was suspended and the central railway station evacuated. Public transport was reopened several hours later when police gave a cautious “all clear”.
Thousands of people stranded by the emergency and unable to get home were offered shelter by local residents.
First reports of the shooting came in just before 18:00 (16:00 GMT) on Friday.
Witnesses said the attacker opened fire on members of the public at a fast-food restaurant in Hanauer Street before moving to the nearby Olympia shopping centre.
A video circulated on social media showed a pistol-wielding man dressed in black walking away from a restaurant while firing on people as they fled.
Police described it as “an acute terror situation” although officials stressed that the motive was as yet unknown.
Witness Luan Zequiri, who was in the shopping centre, told German broadcaster N-TV that the attacker had been wearing military-style boots and a backpack.
“I looked in his direction and he shot two people on the stairs,” he said.
Mr Zequiri said he hid in a shop but when he left he saw bodies of the dead and wounded on the ground.
Chancellor Angela Merkel’s chief of staff, Peter Altmaier, told national TV: “We cannot rule out that it is linked to terrorism but we can’t confirm it either, but we are also investigating in this direction.”
Mrs Merkel is to convene her government’s security cabinet on Saturday.
Police urged the public to avoid speculation on social media and to desist from using photos or video of their deployments online.
German security forces have been on alert since a teenage migrant stabbed and injured five people on a train in Bavaria on Monday, in an attack claimed by so-called Islamic State.
The authorities had warned of the danger of further incidents.
Germany’s allies rallied to give their support following Friday’s attack.
US President Barack Obama said the US would give “all the support that they may need in dealing with these circumstances”.
French President Francois Hollande offered his “sympathy and support to the German people in this difficult hour”.
British Foreign Secretary Boris Johnson said he was “shocked and appalled” by the attack.
“We stand ready to assist our friends in Germany,” he added.