Although police did not themselves confirm the name of the dead man, who has been widely identified by Danish and international news media, they told reporters the assailant was born in Denmark and had a criminal record, including violence and weapons offences. Police believe the suspect carried out both shootings alone but were investigating whether he had received help from others.

Jens Madsen, head of the Danish intelligence agency PET, said investigators believe the gunman was inspired by Islamic radicalism. "PET is working on a theory that the perpetrator could have been inspired by the events in Paris. He could also have been inspired by material sent out by (the Islamic State group) and others," Madsen said.

Copenhagen Police handout photo of the main suspect in a shooting at a freedom-of-speech event in Copenhagen and later at a synagogue

Earlier Sunday, at least two people with handcuffs were taken out by police from an Internet cafe in Copenhagen, Danish media reported. Police spokesman Steen Hansen told The Associated Press that "the action was part of the police investigation" but declined to give further details.

The first shooting happened before 4 pm Saturday when the gunman used an automatic weapon to shoot through the windows of the Krudttoenden cultural centre during a panel discussion on freedom of expression featuring a Swedish artist who had caricatured the Prophet Muhammad. The artist, Lars Vilks, was whisked away unharmed by his bodyguards, but Noergaard was killed and three police officers were wounded.

The attack at the synagogue occurred hours later, shortly before 1 am on Sunday morning.

About four hours later, the shooter was confronted by police as he returned to an address that they were keeping under surveillance. Investigators described him as 25 to 30 years old with an athletic build and carrying a black automatic weapon. They released a blurred photograph of the suspect wearing dark clothes and a scarf covering part of his face.

Oliver Larsen, 26, who lives in a building above the street where the suspect was shot dead, said he was awoken at 5 am by the sound of shooting.

"I looked out of the window to see what was going on and I saw a lot of policemen and a guy lying on the street; he was probably dead," Larsen told the AP.

Vilks, a 68-year-old artist who has faced numerous death threats for depicting Muhammad as a dog in 2007, told The AP he believed he was the intended target of the first shooting, which happened at a panel discussion titled "Art, blasphemy and freedom of expression."

"What other motive could there be? It's possible it was inspired by Charlie Hebdo," he said, referring to the January 7th attack by Islamic extremists on the French newspaper that had angered Muslims by lampooning Muhammad.

The attacks took place two days after Denmark and its partners in the European Union agreed to dramatically boost cooperation in the counter-terrorism field as a result of the January attacks in Paris, which claimed the lives of 17 victims.

The EU's law enforcement agency, Europol, said Sunday it was in contact with Danish authorities and proposing its help to find out as much as possible about the Copenhagen gunman and whether he was acting alone or in concert with others.