Danish police said three people were killed in a shooting at a shopping centre in the capital, Copenhagen, on Sunday.
The shooter is a Danish man, 22, who was detained near Fields shopping mall, said Chief Insp Soren Thomassen, head of the Copenhagen police operations unit.
He has been charged with manslaughter and is in custody.
Chief Insp Thomassen said that the dead were a man in his 40s and “two young people”. Three others were critically wounded in the shooting.
The assailant was known to the police “but only peripherally”, he said.
Chief Insp Thomassen said that terrorism could not be ruled out but there was no indication that anyone else was involved in the attack.
“We do not have information that others are involved. This is what we know now,” he said.
Police received the first reports of a shooting at 5.37pm and arrested the suspect 11 minutes later.
Danish Prime Minister Mette Frederiksen said the Scandinavian country had been hit by a “cruel attack.”
“It is incomprehensible. Heartbreaking. Pointless,” Ms Frederiksen said. “Our beautiful and usually so safe capital was changed in a split second.”
Local media published images showing heavily armed police officers at the scene and people running out of the mall.
Laurits Hermansen told Danish broadcaster DR that he was with his family when he heard “three, four bangs. Really loud bangs. It sounded like the shots were being fired just next to the store”.
A huge police presence was on hand, with several fire vehicles also parked outside the mall.
Danish news site BT published unverified video footage it said was shot by a witness to the attack, Mahdi Al Wazni, showing a man with a large rifle walking through the mall and swinging it around his shoulders.
“He seemed very aggressive and shouted different things,” Mr Al Wazni said.
Footage published by media outlet Ekstra Bladet showed a person being carried by rescue workers into an ambulance on a stretcher.
“People first thought it was a thief … then I suddenly heard shots and threw myself behind the counter inside the store,” witness Rikke Levandovski told broadcaster TV2.
“He is just shooting into the crowd, not up in ceiling or into the floor.”
Another witness, Isabella, told public broadcaster DR: “My friend and I … suddenly we hear shots. I hear about 10 shots and then run as fast as we can into a toilet. We squeeze into this tiny toilet where we are around 11 people.”
The shopping mall is on the outskirts of Copenhagen, across from a subway station for a line that connects the city centre with the international airport. A major motorway also runs next to the mall.
Organisers called off a Harry Styles concert that had been scheduled at the nearby Royal Arena.
On social media, Styles wrote: “My team and I pray for everyone involved in the Copenhagen shopping mall shooting. I am shocked. Love, H.”
The terrorist threat against Denmark is assessed to be “serious”, with the biggest risk coming from “militant Islamism”, the latest report from the Danish Security and Intelligence Service says.
The threat to Denmark from right-wing extremists is considered at a “general” level, which means there is capability and or intent and possibly planning.
Denmark last had a militant attack in 2015, when two people were killed and six police wounded when a gunman shot and killed a man outside a culture centre hosting a debate on freedom of speech, and later killed a person outside a Jewish synagogue in central Copenhagen.