The man behind a shooting in a Copenhagen shopping mall which left three people dead and several wounded was jailed for 24 days on Monday after facing preliminary questioning in a city court, Danish police said.
The 22-year-old Danish male, who on Sunday afternoon opened fire on shoppers in the Field's mall a few kilometers south of downtown Copenhagen, was arrested and charged with manslaughter and intent to kill.
He will be kept in custody in a closed psychiatric ward, authorities said.
The incident rocked Denmark at the end of a week in which it hosted the first three stages of the Tour de France cycle race and hundreds of thousands of cheering Danes took to the streets across the country.
The shooter, whose name is subject to a publication ban, shot and killed two 17-year-olds, a man and a woman, and a 47-year-old Russian citizen living in Denmark. Four other people were also wounded by gunshots.
Three of them were now stable and one remained in critical condition, a health official from Danish emergency medical services said.
The wounded included two Swedish citizens, a 50-year-old man and a 16-year-old woman.
The incident could not be viewed as an 'act of terror' based on current evidence, Chief Police Inspector Soren Thomassen told reporters earlier on Monday, adding there was no indication the suspect had acted together with others.
'There has been some sort of deliberation and preparation (by the suspect) up to this terrible event,' Thomassen told a news conference without providing details on the perpetrator's possible motives.
'Our current assessment is that these are random victims.'
A number of people were slightly injured when fleeing the scene, but not by gunshots.
The attack took place when many young people had flocked to the mall ahead of a concert due to be held by British singer Harry Styles in Copenhagen on Sunday evening not far from the shopping center. The concert was cancelled.
'I'm heartbroken along with the people of Copenhagen. I adore this city. The people are so warm and full of love. I'm devastated for the victims, their families, and everyone hurting,' Styles wrote on Twitter.
'I'm sorry we couldn't be together. Please look after each other.'
The suspect, who police said was known to psychiatrists in Denmark, was in possession of a rifle, ammunition and a knife when he was arrested.
Danish gun laws are strict and all weapons, with the exception of some hunting rifles, require a license issued by the police. The type of weapons used by the suspect had been legal, police said, but the shooter did not have a license to use them.
Denmark's largest cinema operator Nordisk Film, which has a venue at the Field's shopping center, said it had decided to close its theaters across the country on Monday due to the shooting.