COPENHAGEN, Denmark -- Danish police say the gunman behind weekend shootings at a free speech seminar and a synagogue in Copenhagen used an assault rifle and two hand guns in the attacks.

Omar Abdel Hamid El-Hussein, 22, was killed in firefight with police early Sunday after a shooting spree that authorities say may have been inspired by the terror attacks in Paris last month.

Copenhagen police confirmed his identity late Tuesday, after several media, including The Associated Press, had already confirmed it through sources.

In the first attack, El-Hussein killed a Danish filmmaker outside the building hosting the free speech seminar Saturday with a single shot from a M95 assault rifle, police spokesman Joergen Skov said. El-Hussein then sprayed the entrance with 27 bullets, wounding three police officers inside.

That type of weapon was used by the Danish military between 1995 and 2010, said Rene Gyldensten, a spokesman for the Danish Defence Acquisition and Logistics Organization. It is also used by other NATO forces.

"It could be one of our weapons," Gyldensten told the AP on Wednesday, adding that police had not yet asked the Defence Ministry to check serial number records.

It was unclear how El-Hussein obtained the weapon, which cannot be purchased legally in Denmark.

Investigators said police returned fire, including Swedish officers who were in Copenhagen as bodyguards for Lars Vilks, a Swedish artist who has received numerous death threats for caricaturing the Prophet Muhammad and who may have been the main target of the attack. It was unclear whether they missed or whether the gunman was wearing a bullet-proof vest that stopped their bullets.

After fleeing the scene, El-Hussein appeared nine hours later outside a synagogue in Copenhagen where he fired nine rounds with two hand guns, killing a Jewish security guard and wounding two police officers. Skov says El-Hussein carried the two handguns when he was shot by a SWAT team early Sunday.

Denmark's prime minister and justice minister were among hundreds of mourners at the funeral Wednesday for the security guard, Dan Uzan. The ceremony was held in the Jewish section of a cemetery in Copenhagen.

A Denmark native with Palestinian parents, El-Hussein had been in and out of prison for violence and weapons offences and had recently served time for a stabbing on a commuter train, court documents show.

The Danish Security and Intelligence Service, known by its Danish acronym PET, acknowledged Tuesday that El-Hussein was flagged in September under a program meant to alert PET to "inmates who are at risk of radicalization."

What prompted prison authorities to sound the alarm is unclear, but PET said that the information gave the agency "no reason to believe" that he was plotting attacks.

El-Hussein's family have asked for him to be buried in a Muslim cemetery in a Copenhagen suburb but police have not yet released his body, said Kasem Said Ahmad of the Danish Islamic Funeral Foundation.

Associated Press writer Karl Ritter in Stockholm contributed to this report.