A 22-year-old man, believed to have had a history of mental health issues, has been charged with the murder of three people after opening fire at a shopping centre in Denmark’s capital Copenhagen.

Two Danish citizens, both aged 17, and a 47-year-old Russian citizen were killed in Sunday’s attack. Authorities said that they believe the suspect, who has not been identified, acted alone and there is no indication of a terror motive.

The suspect, who was seen in some grainy images and footages shared online, had a rifle and a knife. His shooting was random – “not motivated by gender or anything else,” police said.

Also Read | Copenhagen shooting suspect known among psychiatric services: Police

The suspect appeared in front of a court in a blue T-shirt accompanied by three heavily armed officers, Danish media report.

The suspect’s lawyers refused to enter a plea for the accused. The judge also imposed a name ban on both the suspect and the victims.

The suspect will be remanded in a closed psychiatric ward for 24 days, authorities said.

Speaking to reporters earlier on Monday, police chief Soeren Thomassen said they believed the suspect – described as “an ethnic Dane” – was not helped by anyone else. He added that the suspect was known “peripherally” to police.

Those injured were two Danish citizens – a 40-year-old woman and a 19-year old woman. The other two are Swedes – a 50-year-old man and a 16-year old woman.

Also Read | Copenhagen shooting: An eyewitness account

One remains in critical condition, the chief physician at one of the hospitals treating the victims said. Three others were hit by stray bullets, taking the total number of people shot to 10, police said.

Of the 10 shot, six were women and four were men, police inspector Dannie Rise told reporters. One of those shot was an Afghan national, she added.

The deadly attack took place at Field’s shopping mall Sunday, according to police.

One eye-witness, identified as Isabelle, told Danish media: “Suddenly we hear shots – 10 shots I think – and then we run through the mall and end up in a toilet, where we huddle together in this tiny toilet, where we are around 11 people.

“It’s really hot and we wait and we are really scared. It’s been a terrible experience.”

Another eyewitness, Mikkel Suldrup, told the BBC’s Jessica Parker: “One moment I was making pizzas, the next moment a woman ran in and told us a man had started shooting… it just went chaotic… People crying, people panicking.

Also Read | Copenhagen shooting: Police say gunman acted alone, likely not ‘act of terror’

“A lot of people sought refuge in our restaurant. We had some kids who got lost from their parents. It was really terrible,” he said. “I was scared of course. You had this feeling he could have come into our shop.”

Police arrested the suspect near the mall just 13 minutes after being alerted about the attack.