The Copenhagen shootings suspect was tracked down and killed by police on Sunday. The 22-year-old Danish-born gunman killed two people at a synagogue and an event promoting free speech on Saturday.

Chief of the Danish Security and Intelligence Service Jens Madsen said the gunman, whose name has not been released, was known to intelligence services before the shooting with a record of violence, gang-related activities, and weapons possession. They believe he acted alone and was inspired by attacks in France during January. However, intelligence services don’t believe he was trained in jihadist camps in the Middle East.

During two separate attacks on Saturday, a synagogue guard and a filmmaker were killed while five police officers were wounded.

Witnesses to the Copenhagen shootings said the suspect fired up to 40 shots from an alleged automatic weapon at a cafe hosting a free speech event. The event featured Swedish artist Lars Vilks, who received death threats for depicting Prophet Mohammad’s head on a dog in 2007. He was unharmed during the shooting. However, the gunman killed 55-year-old filmmaker identified by the Danish Film Institute as Finn Noergaard.

Though the free speech event was guarded, the gunman escaped. Then he moved to a synagogue where a girl’s confirmation was taking place. The guard protecting the event was killed. He was identified by the Jewish Society as 37-year-old Dan Uzan.

Denmark was kept on high alert during Sunday and police will continue to patrol Copenhagen’s streets for safety. Authorities have been on alert since the three days of violence in January after the Charlie Hebdo attack in which 17 people died.

“We have tasted the ugly taste of fear and powerlessness that terror would like to create. But we have also, as a society, answered back,” said Danish Prime Minister Helle Thorning-Schmidt.

French President Francois Hollande said, “Denmark and France are the same nations, feeling the same sadness but also the same will to resist, fight, and defeat terrorism. They hit the same targets, they hit what we are, what we represent, the values of freedom, the rule of law, that all citizens, whatever their religion, should be able to enjoy.”

Violent extremists targeted Denmark 10 years ago after cartoons of the Prophet Mohammad were published. The extremists considered any depiction of the prophet as blasphemous.

Israeli Prime Minister Benjamin Netanyahu has welcomed European Jews to his country in light of the attacks and violence during recent months.

When police killed the Copenhagen shootings suspect, who had opened fire again, he had two handguns on him. Police later found an automatic weapon that may have been used in Saturday’s attacks.