Investigative personnel work at the scene of a cafe shooting in Oesterbro, in Copenhagen, February 15, 2015. REUTERS/Hannibal Hanschke

On a non-descript street in Norrebro, an ornate mosque, building sites and drab office buildings share a few hundred square metres with the headquarters of the Hells Angels. This was where Islamic State-inspired gunman Omar Abdel Hamid al-Hussein was killed by Danish police on 15 February 2015 after killing two men and injuring six.

Hussein was a petty criminal and gang member who had served time for a stabbing on the Copenhagen subway and was later radicalised. On his Facebook page, the 22-year-old apparently swore allegiance to Isis leader Abu Bakr al-Baghdadi just nine minutes before the first shooting. Earlier he had uploaded a quote from the Quran warning 'disbelievers' that they would be 'driven from their homes'.

In the wake of the attacks – which killed Finn Nørgaard, 55, a film director and a Jewish man, Dan Uzan, 37 – Danish media reported that Hussein had only recently been released from prison and had a background in the rough housing estates of northern Copenhagen, where he had once been affiliated with an Arab street gang known as the 'Brothas'.

The attacks caused outrage across the world but also some soul-searching in Denmark. The country of just under six million has welcomed refugees throughout the 20th century, including those from eastern Europe, the Middle East and the Balkans. Many of them were housed in traditional working class neighbourhoods, which tend to have higher rates of unemployment.

Some are now speculating how much the failures to ensure immigrant communities were effectively integrated in Denmark has made those sectors of Danish society more susceptible to criminality and radicalisation. In the wake of Omar's killing, dozens of bouquets of flowers were left at the site where he was shot. One woman, Janni Nielsen, left flowers at the site claiming that Denmark had 'failed to accommodate [...] young people from alternative communities'.

Denmark Omar el-Hussein
An image released by Danish police of Omar Abdel Hamid El-Hussein and received by Reuters on February 16, 2015 Reuters/ Danish police

On a sunny afternoon in Norrebroparken, Copenhagen, IBTimesUK meets a Dane who knows such alternative communities well. Aydin Soei, a sociologist, is author of Angry Young Men, a study of immigrant street gangs in Denmark. He sets out a theory of 'counter-citizenship' in Denmark, a feeling of exclusion that is fuelling both recruitment to street gangs and radicalisation.

"When people feel that they have pay an extra price because of the place that they are living, their skin colour and their age, then the role of religion becomes even greater. We also have to pay a price for our religion – it is hard to get recognised as equal citizens as Muslims and it is in that narrative that you find the criminal environment," he said.

Young criminals like Hussein drawn towards radical ideologies not only because of their social isolation, but also because they are already used to violence. Many have access to weapons through criminal networks and already know how to use them, having honed their skills in the regular gang wars between Arab and biker gangs that regularly arise over territory.

"The ones that are rounded by the criminal subculture are used to doing violence. When they get radicalised it goes really quick," says Soei, snapping his fingers. "And often the intelligence services don't pick them up quick enough – that is what we saw with Omar al-Hussain."

Not all disenfranchised young immigrants become gangsters or jihadis of course, as Soei himself can attest. He is the son of Iranian refugees who moved to Denmark in 1986 and whose qualifications were not recognised by the government. His mother went back to school and has a successful career in Denmark but his father fell into a downward spiral which culminated in him killing another man, being convicted, jailed and then deported.

People attend a memorial service held for those killed on 15 February 2015 by a 22-year-old gunman, in Copenhagen REUTERS/Leonhard Foeger

"My dad became bitter that his skills weren't worth anything and [...] he got angry. He talked about Denmark being a racist country and started drinking and getting more and more f**ked up until he killed another man and was thrown out of the country. You have a lot of young men whose dads from the first generation have failed, who were not there and when they were there, they were violent," Soei said.

Denmark appears to be learning its lesson. Not only has there been a push to get refugees and migrants into work as soon as possible, but they often begin studying or working before their asylum claims have even been decided. There is also an effort on the part of the government to make it easier for skilled refugees to have their qualifications recognised when they come to Denmark.

"That's how you get language and social skills that you can give on to your own kids. My generation of youngsters have grown up with parents who aren't in the labour market and who are angry at the Danish society. Or who look at themselves as clients rather than citizens and that are really bad values to give onto your kids," Soei said.