A man shot dead by Danish police early today is likely to have been behind the shootings at a free speech event and a synagogue in Copenhagen, an investigator says.

Joergen Skov said "nothing at this point suggests there were other perpetrators" in the shootings that left two people dead and five police officers wounded.

The dramatic events that unfolded in Copenhagen stirred fears that another terror spree was underway in a European capital a month after 17 people were killed in Paris attacks.

Mr Skov said the gunman was killed in a firefight with police in the Norrebro district of the city. No police were wounded in that shooting.

The first shooting happened before 4pm local time yesterday when a gunman used an automatic weapon to shoot through the windows of the Krudttoenden cultural centre during a discussion on freedom of expression featuring a Swedish artist who caricatured the Prophet Mohammed.

The artist, Lars Vilks, was whisked away unharmed by his bodyguards but a 55-year-old man attending the event was killed, while three police officers were wounded.

Two belonged to the Danish security service PET, which said the circumstances surrounding the shooting "indicate that we are talking about a terror attack".

Early this morning, police said one man was killed and two police officers wounded in another shooting outside a synagogue by a gunman who fled on foot.

Dan Rosenberg Asmussen, the head of Denmark's Jewish community, told public broadcaster DR the victim at the synagogue was a Jewish man who was guarding the entrance of a building adjacent to it.

Mr Skov said the gunman was confronted by police as he returned to an address that they were keeping under surveillance.

Mr Vilks, a 68-year-old artist who has faced numerous death threats for depicting Mohammed as a dog in 2007, said 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.

The January 7 attack by Islamic extremists targeted the French newspaper that had angered Muslims by lampooning Mohammed.

Police at the time said it was possible the gunman had planned the "same scenario" as in the Charlie Hebdo massacre.

Leaders across Europe condemned the violence and expressed support for Denmark.

Sweden's security service said it was sharing information with its Danish counterpart, while a US National Security Council spokeswoman said officials were ready to help with the investigation and have been in touch with Danish staff.

Mr Vilks has faced several attempted attacks and death threats after he depicted the Prophet Mohammed as a dog in 2007.

A Pennsylvania woman last year got a 10-year prison term for a plot to kill him. In 2010, two brothers tried to burn down his house in southern Sweden and were imprisoned for attempted arson.

The depiction of the prophet is deemed insulting to many followers of Islam. According to mainstream Islamic tradition, any physical depiction of the him - even a respectful one - is considered blasphemous.

While many Muslims have expressed disgust at the deadly assault on the Charlie Hebdo employees, many were also deeply offended by its cartoons lampooning Mohammed.