A civilian was killed and three police wounded on Saturday when a masked gunman sprayed bullets at a Copenhagen venue holding a meeting attended by a Swedish artist threatened with death for his cartoons of the Prophet Mohammad.
Danish police said the suspect shooter escaped in a getaway car. Hours later, shots were fired at a synagogue early on Sunday, with one person hit in the head and two police officers wounded. Police said it was too early to connect the two attacks.
Prime Minister Helle Thorning-Schmidt said Denmark was on high alert after a "terrorist attack" police said was aimed at artist Lars Vilks, who stirred controversy in 2007 with published drawings depicting the Prophet Mohammad as a dog.
The attacker escaped in a car that was found later in the outskirts of Copenhagen. Police could not yet describe the precise condition of the person shot in the head or the police officers who were hurt in synagogue attack.
The cafe complex was hosting a cultural event called "Art, Blasphemy and Freedom of Expression". French ambassador to Denmark Francois Zimeray, who was attending the event, likened the shooting to the attack on the Charlie Hebdo newspaper in Paris by Islamist militants that killed 12 people last month.
"We feel certain now that it was a politically motivated attack, and thereby it was a terrorist attack," Thorning-Schmidt told journalists close to the site of the attack.
European Council President Donald Tusk called the attack "another brutal terrorist attack targeted at our fundamental values and freedoms, including the freedom of expression."
Witnesses said one or more gunmen had tried to shoot their way into the venue before guards returned fire. Vilks, the event's main speaker, and Zimeray were unharmed.
"I heard someone firing with automatic weapons and someone shouting. Police returned the fire and I hid behind the bar. It felt surreal, like in a movie," Niels Ivar Larsen told Danish TV2.
The police said at first they were seeking two men who had sped off in a getaway vehicle, but later said they were looking for one man and issued a photograph of a suspect wearing a thick coat and maroon bobble hat. His face was obscured by a scarf.
"I'm still a bit stunned. I was inside, I had just sat down after my speech and then I heard shots," Zimeray told French news channel TF1.
"We all dove to the floor as we heard the gunshots and tried to protect ourselves, and we crawled to the emergency exit."
Media reports and witnesses on Twitter described the attack, saying between 20 and 40 shots were fired from an automatic weapon. Television footage showed windows of the arts centre and cafe riddled with bullet holes.
"The security guards shouted 'Everyone get out!' and we were being pushed out of the room," Helle Merete Brix, organiser of the event, told Reuters. "They tried to shoot their way into the conference room ... I saw one of them running by, wearing a mask. There was no way to tell his face."
Sound technician Palle Vedel told Danish DR news channel that the meeting had been opened by the French ambassador, who praised Denmark for the support following the Charlie Hebdo shootings.
Denmark itself became a target after the publication 10 years ago of cartoons lampooning the Prophet Mohammad, images which led to sometimes fatal protests in the Muslim world.
"Before the ambassador even got the opportunity to give the floor to Lars Vilks, the meeting was interrupted when one or more men started shooting at the cafe," Vedel said.
Police said the dead civilian man was 40 years old.
Sweden's security police said Swedish bodyguards were with Vilks at the time of the shooting while authorities in southern Sweden said they were helping Danish police. Sweden is joined to Denmark by bridge and transit across is largely unchecked.
In January, 17 people were killed in France in three days of violence that began when two Islamist gunmen burst into the Paris offices of the satirical weekly Charlie Hebdo, opening fire in revenge for its publication of satirical images of Mohammad.
Vilks stirred controversy in 2007 with published drawings depicting Mohammad as a dog which sparked threats from Islamist militant groups.
He has received numerous death threats and has lived under the constant protection of the Swedish police since 2010. Two years ago, an American woman known as Jihad Jane was sentenced to 10 years in prison for plotting to kill him.
French President Francois Hollande said Interior Minister Bernard Cazeneuve would go to the Danish capital as soon as possible.