COPENHAGEN, Denmark (AP) — Danish police say they shot and killed a man early Sunday who was likely behind the shooting attacks at a free speech event and a synagogue in Copenhagen.

Investigator Joergen Skov told reporters that “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.

Skov said the gunman was killed in a firefight with police in the Noerrebro district of Copenhagen. No police were wounded in that shooting.

The first shooting happened before 4 p.m. Saturday when police said a gunman used an automatic weapon to shoot through the windows of the Krudttoenden cultural center during a panel discussion on freedom of expression featuring a Swedish artist who had caricatured the Prophet Muhammad. 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, authorities said.

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

After midnight Sunday, police said one man was killed and two police officers wounded in another shooting outside the synagogue by a gunman who fled on foot.

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

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

Vilks, a 68-year-old artist who has faced numerous death threats for depicting Muhammad as a dog in 2007, told The Associated Press 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, referring to the Jan. 7 attack by Islamic extremists on the French newspaper that had angered Muslims by lampooning Muhammad.

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

___

Ritter reported from Stockholm. Thomas Adamson in Paris contributed to this story.