Copenhagen - Danish police said on Sunday a gunman killed by officers after two fatal shootings in Copenhagen may have been inspired by last month's Islamist attacks in Paris.
The man, believed to be the sole perpetrator of what the Danish prime minister called "a cynical act of terror", was previously known to intelligence services, police said.
He "may have been inspired by the events that took place in Paris a few weeks ago," Jens Madsen from the Security and Intelligence Service told reporters.
He added that the man may "generally have been inspired by militant Islamist propaganda issued by ISIS [Islamic State] and other terror organisations."
He said police were looking into the possibility that the man had travelled to conflict zones such as Syria and Iraq.
The gunman, who was not further identified, was believed to be behind two separate shootings that shocked Denmark's usually peaceful capital.
On Saturday, a 55-year-old man was killed at a panel discussion about Islam and free speech attended by Lars Vilks, a Swedish cartoonist behind a controversial caricature of the Prophet Muhammad.
In the second attack, a 37-year-old Jewish man was killed outside Copenhagen's main synagogue early on Sunday. Five police officers were wounded in the two attacks.
"We believe the same man was behind both shootings and we also believe that the perpetrator who was shot by the police action force at Noerrebro station is the person behind the two attacks," senior police official Torben Moelgaard Jensen told a press conference.
The first lethal attacks on Danish soil in decades were branded "deplorable" by the United States and triggered condemnation around the world.
'Day of sorrow'
"We have experienced the ugly taste of fear and powerlessness which terror hopes to create," Prime Minister Helle Thorning-Schmidt told a briefing, saying Denmark was experiencing "a day of sorrow".
"We will defend our democracy and we will defend Denmark at any time," she said.
The killing of the suspected attacker capped a massive police manhunt launched after the gunman fled the scene following both shootings.
The shootout took place shortly before dawn in the neighbourhood of Noerrebro, where police had been keeping an address under observation.
Police said video surveillance had led them to believe that the man killed by armed police was behind both attacks, but that they were still investigating whether he was acting alone.
The shooting came at the end of a night of fear that had gripped the city of about one million, which had been spared major attacks in recent years.
The central area of Copenhagen that is home to both the synagogue and Noerreport station, the country's busiest rail hub, was cordoned off by police carrying machine guns.
Swedish security services told AFP they were on alert for any attempt by a suspect to cross the bridge linking Denmark with Sweden.
Increased controls introduced at the border with Germany were relaxed after the killing of the suspected attacker, Denmark's TV2 reported.
Michael Gelvan, chairperson of the Nordic Jewish Security Council, told AFP the victim at the synagogue was a young Jewish man who had been providing security for a ceremony.
Danish police had released a photo of the suspect in the cultural centre attack, wearing a black puffer jacket and a maroon balaclava and carrying a black bag.
Spectre of Charlie Hebdo attack
The windows of the cultural centre were pockmarked by bullet holes, and the BBC released chilling audio of the moment a speaker at the event was interrupted by a volley of gunshots.
France's ambassador to Denmark, Francois Zimeray, who attended the debate but was unhurt in the attack, told AFP the shooting was an attempt to replicate the 7 January attack on Charlie Hebdo magazine in Paris, which was targeted because it had published cartoons lampooning the Prophet Muhammad.
"They shot from the outside [and] had the same intention as Charlie Hebdo, only they didn't manage to get in," the ambassador said.
"Intuitively I would say there were at least 50 gunshots, and the police here are saying 200," he said.
"Bullets went through the doors and everyone threw themselves to the floor."
The shootings come at a time of heightened security and rising fears of Islamist violence in Europe.
Dozens of suspected jihadists have been arrested across Europe since mid-January and stocks of weapons and explosives have been uncovered.