Danish police have said that the 22-year-old suspect in a shooting at a Copenhagen shopping centre yesterday that left three dead and four people injured, was known to mental health services.

"Our suspect is also known among psychiatric services, beyond that I do not wish to comment," Copenhagen police chief Soren Thomassen told a press conference.

Mr Thomassen added that the victims appeared to have been randomly targeted and there was nothing to indicate the attack was an act of terror.

Copenhagen police said in a tweet that the suspect been charged and will be remanded in custody at a psychiatric facility for 24 days.

The three people who were killed have been identified as two Danish teenagers - a boy and girl both aged 17 - and a 47-year-old Russian citizen residing in Denmark.

Another four people were injured in the shooting: two Danish women, aged 19 and 40, and two Swedish citizens, a 16-year-old girl and a 50-year-old man.

The shooting occurred at the busy Fields shopping mall, located between the city centre and Copenhagen airport.

The gunman, who is Danish and who is believed to have acted alone, was known to the police "but only peripherally".

"He's not someone we particularly know," Mr Thomassen told a news conference after the rare mass shooting, the first since February 2015.

The man, who according to witnesses was armed with a large rifle, was arrested shortly after police arrived at the shopping centre.

Images from the scene showed parents carrying their children as they fled the building and ambulance personnel taking people away on stretchers.

A 22-year-old Danish man was arrested after the shooting

Many people were in the area for a concert with 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 who came to pick up his children, said.

"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.

Mr Styles said he was devastated by news of the attack.

Soren Thomassen said three of the injured people are in critical condition

"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.

An eyewitnesses told Danish media she 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."

The shooting happened at around 5.30pm

Police had urged people in the building to wait inside for their arrival, calling on others to keep away from the area.

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".

Taoiseach Micheál Martin said he was "shocked and saddened by the events in Copenhagen".

In a post on Twitter he said: "My deepest sympathies to the families and friends of those killed and injured. Thoughts are with the people of Denmark."

The Irish Embassy in Denmark issued a helpline number for Irish citizens in Copenhagen.

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.