Copenhagen - The slain gunman suspected in the deadly Copenhagen attacks was a 22-year-old with a history of violence and may have been inspired by Islamic terrorists - and possibly the Charlie Hebdo massacre in Paris, Danish authorities said on Sunday.
Prime Minister Helle Thorning-Schmidt mourned the two people killed and vowed to protect freedom of speech and Denmark's Jewish community.
The suspect was killed in a gunbattle with a SWAT team early on Sunday. He had opened fire Saturday at a cultural centre hosting a seminar on free speech with an artist who had caricatured the Prophet Muhammad and then later at security forces outside a synagogue, police said.
A Danish filmmaker was killed in the first attack. Nine hours later, a security guard protecting a bat mitzvah near a synagogue was slain. Five police officers were wounded in the shootings.
Jens Madsen, head of the Danish intelligence agency PET, said investigators believe the gunman "could have been inspired by the events in Paris." Last month Islamic militants carried out a massacre at the French satirical newspaper Charlie Hebdo followed by an attack on Jews at a kosher grocery, killing 17 people.
"He could also have been inspired by material sent out by [the Islamic State group] and others," Madsen said.
History of violence
Copenhagen police made no mention of Islamic extremism and said the Danish-born suspect had a history of violence and weapons offenses and connections to a criminal gang. They didn't release his name.
"Denmark has been hit by terror," Thorning-Schmidt said. "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."
Chief Rabbi Jair Melchior identified the security guard as Dan Uzan, a 27-year-old member of Denmark's 7 000-strong Jewish community. Two police officers who were near the synagogue were slightly wounded.
Also read: Police: Copenhagen gunman maybe inspired by Paris attacks
In the earlier shooting, 55-year-old filmmaker Finn Noergaard was killed while attending a panel discussion titled "Art, Blasphemy and Freedom of Expression."
One of the main speakers was Lars Vilks, a 68-year-old Swedish artist who has faced numerous death threats for depicting the Prophet Muhammad as a dog in 2007. Vilks, who was whisked away unharmed by bodyguards, told The Associated Press he believed he was the intended target.
Agnieszka Kolek, another panelist, said she heard shouts of "God is great" in Arabic.
"Lars was being evacuated. Everyone was trying to protect themselves and others," she told AP. "We heard the gunshots approaching so I thought that the gunman must be in the building.
"And then I thought obviously I must protect myself and I tried to find a place to hide," she said.
After the shooting, she and other participants continued the discussion as an act of defiance, Kolek said.
The depiction of the Prophet Muhammad is deemed insulting to many followers of Islam. While many Muslims have expressed disgust at the deadly assault on the Charlie Hebdo employees, they also were deeply offended by its caricatures.
Denmark was the focus of anger from Islamists after the 2005 publication of 12 caricatures of the prophet in the Jyllands-Posten newspaper. The cartoons triggered riots in many Muslim countries and militant Islamists called for vengeance.
World leaders, including British Prime Minister David Cameron, German Chancellor Angela Merkel and UN Secretary-General Ban Ki-moon, condemned the Copenhagen attacks.
French President Francois Hollande visited the Danish Embassy in Paris on Sunday, and hundreds gathered outside to show solidarity with victims. Many held candles or banners.
"We need to stand together in Europe and... wherever jihadis try to threaten democracy," said Sacha Reingewirtz, president of the Union of Jewish Students of France and an organiser of the memorial.
Also at the event was Patrick Pelloux, a medic and columnist for Charlie Hebdo.
"We are all Danish tonight," he said.
Israel's Prime Minister Benjamin Netanyahu decried the attack and said his government plans to encourage a "massive immigration" of Jews from Europe.
"Jews deserve security in every country, but we say to our Jewish brothers and sisters, Israel is your home," Netanyahu said at the start of a Cabinet meeting.
Also read: Deadly shootings rock Copenhagen
But Thorning-Schmidt, who laid flowers at the synagogue shooting site, expressed support for the Jewish community, saying: "They belong in Denmark ... and we will do everything we can to protect the Jewish community in our country."
US State Department spokeswoman Jen Psaki offered Washington's help to Danish authorities and said Americans "stand united with the people of Denmark and all others who defend the universal right of freedom of speech and stand against anti-Semitism and bigotry in all its forms."
Police said they believe the gunman carried out the attacks alone, but they were investigating whether he had received any help.
In a raid on a Copenhagen Internet cafe, police removed at least two people in handcuffs, Danish media reported. Police spokesman Steen Hansen told AP that "the action was part of the police investigation" but declined to elaborate.
The European Union's law enforcement agency, Europol, said it was in contact with Danish authorities about their investigation.
"We are offering our expertise and capabilities from our anti-terrorist unit including access to our databases," said Europol spokesman Soeren Pedersen.
The attacks took place two days after Denmark and its partners in the EU agreed to boost cooperation in the counterterrorism field as a result of the 7-9 January attacks in Paris.