Breaking News Emails

Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.
 / Updated 

COPENHAGEN, Denmark — A gunman who killed two people at a synagogue and a free speech event spent time in a prison filled with extremist Islamists who cheered when terrorist attacks took place, according to a union leader.

Omar Abdelhamid Hussein, who was named in a Danish court as the main suspect in Saturday’s shootings, had been released just two weeks earlier after completing his sentence for stabbing a train passenger.

Prison guards in Denmark fear Hussein, 22, was the latest case of prison radicalization — in which criminals become devotees of militant Islam.

Union leader Kim Østerbye said that Hussein had been housed in Copenhagen’s Vestre Fængsel alongside extremists including convicted terrorist Said Mansor, who had previously tried to radicalize other inmates.

An image released by Danish police shows Omar Abdelhamid Hussein on a subway train in connection to a stabbing in Copenhangen on November 22, 2013.Danish Police via Reuters

He said many young Muslim inmates at the facility were openly anti-Semitic and cheered in happiness at news of the massacre at the Charlie Hebdo magazine in Paris in January. He said they often chanted and called for the execution of cartoonists who depict the Prophet Muhammad.

The prison service would not comment on the claims when contacted by NBC News.

A reporter who covered Hussein's assault trial told NBC News that the young man had seemed liked "just a hardened criminal" rather than an Islamist extremist before going to prison.

"Omar, at the trial, didn't seem religious at all. Almost the opposite," Jesper Braarud Larsen said earlier this week. "He just seemed like a callous, hardened criminal … nothing more spectacular about him."

Denmark’s Security and Intelligence Service (PET) admitted Tuesday that Hussein, a Denmark native with Palestinian parents, was flagged in September under a program meant to alert authorities 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 the now deceased 22-year-old alleged perpetrator was planning attacks."

The concept of prison radicalization has been known for decades but has emerged as a real problem since the wave of terror convictions that followed the 9/11 attacks.

Two of the perpetrators of January’s Paris attacks, Cherif Kouachi and Amedy Coulibaly, met a convicted jihadi described as a "sorcerer" and "seducer" inside Europe's largest prison.

At southeast London's Belmarsh prison — which once housed hook-handed hate preacher Abu Hamza, who was jailed for life in the U.S. in January — warders told an official House of Commons inquiry into radicalization [PDF link] that extremist views were "widely disseminated" among inmates.

However, the extent of the problem is unclear and government-sponsored de-radicalization schemes have had a mixed success rate.

Meanwhile, Copenhagen prepared Wednesday for the funeral of a synagogue prison guard who was killed early on Sunday morning. Dan Uzan, who is credited with preventing a much worse massacre, was expected to be buried in a private ceremony at the Vestre Kirkegaard.

The other victim was a 55-year-old filmmaker attending a free speech event at a café organized by Lars Vilks, a Swedish artist who has received death threats for drawings of the Prophet Muhammad. Vilks, the apparent target of the attack, was unharmed.

Peter Keldorff contributed to this report. Alastair Jamieson reported from London.