Denmark has one of the most serious jihadist problems in Europe, with the number of its nationals going off to fight alongside terrorist groups like Isis (Islamic State) beaten only by Belgium.

A survey found that the country has the second highest number of jihadist fighters in Syria: 100 of them, which equates to 18 per million. Belgium has 22 per million and Britain has six per million (ranking fifth worst).

But the Danes have a novel way of dealing with home-grown terrorists, and has launched plans to offer returning fighters therapy instead of confiscating their passports and threatening them with prison – measures suggested to combat the problem in the UK.

"Jihadists are a serious problem for us as a country", Anna Mee Allerslev, Copenhagen's recently elected mayor for integration, told Newsweek. "We've never had this kind of problem before."

It is believed that the controversial Muhammad cartoons that were published in the daily newspaper Jyllands-Posten in 2005 have contributed to the issue, leading to increased polarisation of Danish society and discrimination against immigrants.

Greater numbers of, and more prolific, radical imams are a direct reaction to scandals such as this, says Magnus Ranstop, a leading terrorism expert now based in Sweden's Defence College, which leads to young people signing up to extremist offshoots of Islam.

Jobs, not jail

What motivates these young people is not that far from the motivation the rest of us have: a decent life. For them, joining Isis is fighting for utopia, fighting for a place where they\'re wanted. - Preben Bertelsen, University of Aarhus

But while other countries are sending their jihadists to court – last month 46 suspected jihadists went on trial in Belgium – the Danes are tackling the problem in an innovative way, by sending them to psychiatrists and assisting in reintegration with the help of their families.

"Our main principle is inclusion" said Preben Bertelsen, a professor of psychology at the University of Aarhus, who has played a leading role in the so-called Aarhus model for jihadist deradicalisation.

"What motivates these young people is not that far from the motivation the rest of us have: a decent life. For them, joining Isis is fighting for utopia, fighting for a place where they're wanted.

"We're not stigmatising them or excluding them. Instead, we tell them that we can help them get an education, get a job, re-enter society."

A Copenhagen specialist says that around 30 jihadists, including several who have returned from Syria, have enrolled in the programme, in which counsellors tell jihadists that it is "okay to become politically or religiously radicalised" but that using violence is not.

On a national level, the Danish government recently announced the launch of an "exit centre" for people keen to leave extremist groups. While fighters are screened, and those who have committed crimes are dealt with by the courts, the rest of the returnees are given the option of reintegration.

"Quite a few of these youngsters really want to talk to us", continues Bertelsen. "The jihadists in the programme are here because they've heard from their jihadist friends on social media and Skype that when you come back to Denmark, there are people who will help you with integration, help you get a job, get a place to live."

Most, he reports, are young men returning from Syria disillusioned by the promises of jihad.

This is a condensed version of a feature in Newsweek, which will be on shelves on October 24, 2014. "Denmark offers returning jihadis a chance to repent" is written by Elisabeth Braw.