He then walked inside and unwrapped a brand new kitchen knife with an 8-inch blade and began "brutally" attacking a pair of men, including the 50-year-old who died at the scene.
Police said the man was 26 years old but did not confirm his name or his nationality.
- Who was the attacker?
Before the attack, the man had entered and then left the store, Ms. Hennings said.
Police said that he "struck out wildly" at others, wounding five more in the supermarket - a 50-year-old woman and four men aged 19, 56, 57, and 64.
A friend had tipped off authorities about changes in the man's behaviour, telling them he had stopped drinking alcohol and started talking about the Koran, said Torsten Voss, head of the Hamburg branch of the domestic intelligence agency. The Berlin incident was the last - and most deadly - in a series of assaults involving refugees that shook Germany past year in the wake of an influx of 1 million asylum seekers into the country in 2015.
The motive for the attack was not immediately known, but German media said it could be terrorism-related.
Kathrin Hennings, from the state police office, said the perpetrator bought bread from the supermarket before leaving and boarding a bus, but quickly returned, took a knife from a shelf, unwrapped it and launched the attack without warning.
A 35-year-old Turkish man finally managed to overpower him using a pole, Spiegel Online reported, suffering injuries himself in the process. "First reports about a possible robbery can not be confirmed so far", he said.
"He was always helping other asylum seekers with their paperwork", his neighbour, who gave his name only as Mohamed, told AFP.
Chancellor Angela Merkel opened Germany's borders in 2015, bringing more than one million asylum seekers to Germany since.
Mayor Olaf Scholz said it was a "malicious attack", adding that the alleged attacker was a foreigner whom authorities had tried to deport but couldn't because he didn't have the required documents.
According to the Bild newspaper citing witnesses, the attacker shouted "Allahu Akbar".
- UFC planning shock winter return for WWE superstar Brock Lesnar
- Iran 'launches satellite-carrying rocket'
- PUBG To Offer Vanity Items Inspired by Battle Royale Movie
- Apple to build three new 'big' plants in US
- 'Atomic Blonde' Spoilers: Is There an End Credits Scene?
- Protesters gather against Trump ban on transgender troops
- Twitter Tumbles in Second Quarter with Stalled User Base
- The Hammerson plc (HMSO) Rating Reiterated by Credit Suisse Group
- Foxconn Coming to Southeastern Wisconsin
- Tesla finally shows off the Model 3's stunningly minimalist interior