The presumed gunman was shot and killed early on Sunday morning by police who were monitoring an address in the Norrebro district of the city.
The man’s name has not been confirmed.
A film director and a synagogue guard were killed in separate attacks. Five police officers were also injured.
Police believe the gunman was acting alone.
He was known to them in connection with criminal gangs and had convictions for violent offences and dealing in weapons.
“It was the case that when the suspect was shot and killed during police action, he was armed with pistols,” police commissioner Thorkild Fogde told a news conference.
Danish media have widely named him as Omar El-Hussein, but police did not release the suspect’s identity.
The attacks began on Saturday, February 14, when the gunman fired shots at a cafe hosting a seminar on free speech. It was attended by cartoonist Lars Vilks, who has faced death threats over his caricatures of the Prophet Muhammad.
The gunman opened fire again in the early hours of Sunday outside a synagogue in Copenhagen.
The Danish intelligence service is investigating whether the gunman was copying the shootings in Paris last month, when 17 people were killed in attacks on the satirical magazine Charlie Hebdo and HyperCacher kosher supermarket.
Earlier, the head of the intelligence service told reporters the man had been known to them, and police were working to determine whether he had travelled to Syria or Iraq.
PM Helle Thorning-Schmidt described the shootings as “a cynical act of terror against Denmark” and said her government would not compromise on its defense of free expression.
Helle Thorning-Schmidt later visited the synagogue and said Denmark would do everything to protect its Jewish community.
Denmark prides itself on being one of the few European countries to have saved most of its Jewish population from the Nazi Holocaust in the 1940s.
“When you mercilessly fire deadly bullets at innocent people taking part in a debate, when you attack the Jewish community, you attack our democracy,” Helle Thorning-Schmidt said on a visit to the synagogue on February 15.
“We will do everything possible to protect our Jewish community.”
Israeli PM Benjamin Netanyahu has urged Danish Jews to emigrate to Israel. Denmark’s Chief Rabbi Jair Melchior said he was “disappointed” by Benjamin Netanyahu’s stance, the AP reported.
“If the way we deal with terror is to run somewhere else, we should all run to a deserted island,” said Jair Melchior, according to AP.
There has been widespread international condemnation. The US State Department tweeted: “We stand with the people of Denmark and all who defend the universal right of freedom of speech and stand against anti-Semitism and bigotry.”
Patrick Pelloux, a Charlie Hebdo columnist, said: “We are all Danish tonight.”
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…