A gunman killed three people and wounded several others in a shooting at a busy Copenhagen mall on Sunday as panicked shoppers said they ran for their lives.
A 22-year-old Danish man was arrested after the shooting but his motives were unclear, police said.
The shooter, who was believed to have acted alone, was known to the police "but only peripherally".
"He's not someone we particularly know," Copenhagen police chief Soren Thomassen told a news conference after the rare mass shooting, the first since February 2015.
The young man, who according to witnesses was armed with a large rifle, was arrested peacefully shortly after police arrived at the large Fields shopping mall, located between the city centre and Copenhagen airport.
"There are three dead and several injured, three of them in critical condition," Thomassen said.
The three dead were a man in his forties and two young people whose ages were not specified.
On social networks, people had been speculating about a racist motive, or some other motive, the head of the investigation said, "but I cannot say that we have anything which supports that at this moment."
Police however confirmed they were investigating videos posted online which claimed to show the suspect with weapons and pointing a gun at his head.
Images from the scene showed parents carrying their children as they fled the building and ambulance personnel taking people away on stretchers.
The shooting occurred around 5:30pm, causing panic in the mall. Many visitors were there for a concert with British singer Harry Styles at the nearby Royal Arena, which was cancelled.
"My daughters were supposed to go see Harry Styles. They called me to say someone was shooting. They were in a restaurant when it happened," Hans Christian Stolz, a 53-year-old Swede who came to pick up his children, told AFP.
"We thought at first people were running because they had seen Harry Styles, then we understood that it was people in panic ... We ran for our lives," his daughter Cassandra said.
Styles said he was devastated by news of the attack.
"I'm heartbroken along with the people of Copenhagen. I adore this city," the singer posted on Twitter.
"I'm devastated for the victims, their families, and everyone hurting. I'm sorry we couldn't be together. Please look after each other."
The attack occurred two days after this year's Tour de France cycling competition started from Copenhagen, and the Tour organisers released a statement expressing their sympathy.
"The entire caravan of the Tour de France sends its sincerest condolences to the victims and their families," it said.
Witnesses quoted by the Danish media described how the suspect had tried to trick people by saying his weapon was a fake one, to get them to approach.
"He was sufficiently psychopathic to go and hunt people, but he wasn't running," one witness told DR state television.
Other eyewitnesses told Danish media they had seen more than 100 people rush towards the mall's exit as the first shots were fired.
"We could see that many people suddenly ran towards the exit and then we heard a bang," Thea Schmidt, who was in the mall at the time of the attack told broadcaster TV2. "Then we ran out of Field's too."
Police had urged people in the building to wait inside for their arrival, calling on others to keep away from the area.
"All of a sudden we heard gunshots, I heard 10 shots, and we ran as far as we could to take refuge in the toilet," Isabella told public broadcaster DR. She said she had hidden in the mall for two hours.
Other witnesses described the gunman as a man around 1.8 metres (five feet nine inches) tall carrying a hunting rifle.
Footage of the arrest shows the suspect, wearing a white jumpsuit to preserve DNA evidence, being picked up by officers.
"Denmark was hit by a cruel attack on Sunday night. Several were killed. Even more wounded. Innocent families shopping or eating out," Prime Minister Mette Frederiksen said in a statement.
"Our beautiful and usually so safe capital was changed in a split second."
The Danish royal family said their "thoughts and deepest sympathy are with the victims and their relatives and all those affected by the tragedy".
Finnish Prime Minister Sanna Marin said she was "greatly saddened to hear about the shocking act of violence" while Norwegian Prime Minister Jonas Gahr Store said his "thoughts go to the victims and their relatives and to the relief crews who are currently working to save lives".
The shooting comes just over a week after a gunman opened fire near a gay bar in Oslo in neighbouring Norway, killing two people and wounding 21 others.
In February of 2015, two people were killed and five injured in Copenhagen in a series of Islamist-motivated shootings.