DANISH police have said the suspected gunman killed by police after two deadly shootings in Copenhagen was a 22-year-old with a background in criminal gangs.
Police in Copenhagen have said the suspect was born in Denmark and had a criminal record, including for violence and offences. He has been named by Danish media as Omar Abdel Hamid El-Hussein.
They said an automatic weapon which may have been used in an attack on a cultural centre hosting a free speech event yesterday had been found.
Earlier today, Danish officers confronted the suspected gunman as he returned to an address they had been keeping under surveillance in the Norrebro district of the city. The man was then killed in a fire-fight with police.
Jens Madsen, head of Denmark's security and intelligence service, PET, said the suspect has been identified and was known to the agency.
Madsen said: "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 Isis and others."
Denmark's prime minister Helle Thorning-Schmidt described the first shooting, which bore similarities to the deadly attacks at the newspaper Charlie Hebdo's offices, as a terrorist attack.
In a press conference on Sunday, Thorning Schmidt said Denmark had been "hit by terror".
"We do not know the motive for the alleged perpetrator's actions, but we know that there are forces that want to hurt Denmark.
"They want to rebuke our freedom of speech."
Investigator Jorgen Skov told reporters that "nothing at this point suggests there were other perpetrators" in the two shootings that had also wounded five police officers.
The gunman used an automatic weapon to shoot through the windows of the Krudttoenden cultural centre during a freedom of speech event at around 4pm on Saturday, killing a 55-year-old man and wounding three officers.
The event was hosting Swedish artist Lars Vilks, a cartoonist who had received death threats for depicting the Prophet Mohammad on the body of a dog in 2007.
Danish national broadcaster DR has named the man killed as Finn Noergaard, who directed documentaries.
A man-hunt had already begun when the second shooting occurred after midnight at a Synagogue in the Krystalgade area of the city. The attack left a Jewish man dead while two police officers were shot in the arm and leg, with the gunman fleeing on foot.
Denmark's Jewish community has identified the man as Dan Uzan, a 37-year-old voluntary guard who was standing guard outside of a building behind the synagogue during a bat mitzvah, while around 80 people were inside the event.
Police said it was possible the gunman had been planning the "same scenario" as had played out in the Charlie Hebdo massacre.
Prime minister Thorning-Schmidt told reporters in the Danish capital last night: "We feel certain now that it's a politically motivated attack, and thereby it is a terrorist attack.
"We take this situation extremely seriously. We are in a high alarm all over the country, and our main priority at this stage is to catch the perpetrators and make sure that we find them as soon as possible."
In the cafe attack police said both Mr Vilks and French ambassador to Denmark Francois Zimeray, who was also at the event, were both unharmed. The three police officers were also "out of danger", they said.
Helicopters had been roaring overhead and armoured vehicles prowling the streets as part of the hunt for the gunman when he was discovered.
"We assume that it's the same culprit behind both incidents… that was shot by the police," Chief police inspector Torben Molgaard Jensen told reporters.
Police had issued a blurred photograph of the suspect wearing dark clothes with a scarf covering part of his face. Investigators had described him as aged between 25 and 30 and as having an athletic build, and carrying a black automatic weapon.
Witnesses told Reuters that Zimeray had barely finished his introduction to the event when up to 40 shots rang out outside the venue as the windows of the cafe were sprayed with bullets.
The Danish National Film Institute's chief Henrik Bo Nielsen has said he was shocked and angry to discover that director Noergaard had been killed during a free speech event.
Noergaard directed the 2008 documentary "Le Le", about Vietnames immigrants in Denmark, and the 2004 documentary about an Australian boy's dream to become a world boomerang champion in "Boomerang Boy".
He also directed and produced documentaries for Danish television.
Vilks, 68, who had been escorted to safety by body guards during the attack, told the Associated Press he believed he was the intended target of the first shooting.
"What other motive could there be? It's possible it was inspired by Charlie Hebdo," he said.
He had been part of a panel discussion entitled "Art, Blasphemy And The Freedom Of Expression".
Update your news preferences and get the latest news delivered to your inbox.