Copenhagen police believe a gunman shot dead at the city's main train station was responsible for deadly attacks on the Krudttoenden cafe and a synagogue in which two people were killed and five police wounded.

The suspect was killed after reportedly opening fire on police near Noerrebro Station early this morning. He was identified from CCTV as being responsible for at least one of the earlier shootings.

In a statement Copenhagen police said: "At one point a person who could be interesting in relation to the investigation arrived at the site. He opened fire against the police and was thereafter shot."

Chief police inspector Torben Molgaard Jensen said: "We assume that it's the same culprit behind both incidents, and we also assume that the culprit that was shot by the police task force… is the person behind both of these assassinations."

Copenhegan shooting
Damaged glass is seen at the site of a shooting in Copenhagen Mathias OEgendal/Scanpix/Reuters

The man was killed after a shooting at Copenhagen's Great Synagogue in Krystalgade, three miles from the train station, which left one dead and two police officers injured.

The dead shooting victim was named by the Israeli Foreign Ministry as Dan Uzan, 37. He is believed to be a guard at the synagogue, where a Bar Mitzvah celebration was taking place.

The victim at the Krudttoenden café – where a debate on "Art, blasphemy and the freedom of expression" had been organised by cartoonist Lars Vilks – has not yet been identified.

The gunman fired up to 200 bullets at the café after being refused access by security guards. Three police officers were injured in the attack. The gunman fled in a Volkswagen Polo which was later found abandoned.

Police believe the attack on the café bore strong similarities to the Charlie Hebdo massacre in Paris last month, in which 12 people died including 10 staff from the magazine. Charlie Hebdo was targeted because it depicted the Prophet Mohammed, which is considered a sin for many Muslims.

Swedish artist Lars Vilks, who organised the debate at the café, has also been threatened for drawing images of Mohammed. He lives under constant police protection and in 2010 his home was firebombed.

The debate was held to coincide with the 26<sup>th anniversary of the fatwa against author Salman Rushdie for writing The Satanic Verses. Asked whether he was shaken by the attack, Vilks replied: "I'm not shaken at all by this incident. Not the least."

"Denmark has been hit by terror," Danish Prime Minister Helle Thorning-Schmidt said on Sunday. "We do not know the motive for the alleged perpetrator's actions, but we know that there are forces that want to hurt Denmark. The want to rebuke our freedom of speech."

Prime Minister David Cameron condemned the attack on Twitter, saying: "I condemn the shootings in Copenhagen. Free speech must always be protected. My thoughts are with the Danish people."