With relentless air strikes and ground attacks against Islamic State in Syria, hundreds of their foreign fighters and supporters are massing on the Turkish border, trying to get out. Of the at least 20,000 foreign fighters estimated to have been in Syria, 2,500 were thought to be Europeans, of whom 850 were British. Many may have died, but those who remain are likely to try to return home at some stage. For many people, that will be a frightening thought.

Hundreds of Isis defectors mass on Syrian border hoping to flee Read more

The looming question is: what now? How do we treat them? Even if they say they are repentant or tired of bloodshed, can we trust them? What if these former fighters are returning to form sleeper cells and plan attacks on home soil? And how do we express our own anguish as we remember the innocent victims of their hateful acts or the brazen, ignorance-fuelled destruction of ancient sites?

It is easy to dehumanise: these are the ultimate bad guys, dressed in black, faces covered, killing and maiming with glee. However, there is more to them than meets the eye. For years researchers and activists have delved into why people have been radicalised. They have shed light on the humanity, frustrations and sometimes sheer naivety of those who heeded the call of Isis.

Some went to Syria out of compassion for the plight of Syrians at the hands of the Assad regime, and profound anger at the seeming inaction of their own governments – ignoring the thousands of Syrian civil society activists who begged them to stay away. Others, particularly, the younger women, wanted to free themselves of the shackles of familial expectations, and were lured by a mix of online sexual grooming and the promise of empowerment. Many were petty criminals evangelised in state prisons. Undoubtedly some have mental health issues, and others are simply opportunists.

As this tapestry of human grievance, pain and aspiration returns home, its inhabitants cannot be all tarred with the same brush. Each will need to be dealt with individually.

So what do we do? Many people probably hope that these people are killed or barred from the UK. In 2014 Theresa May, as home secretary, oversaw the passing of a law enabling the government to withdraw UK citizenship from naturalised and dual citizens. If any of the British returnees fall into this category, they could be exiled and forced into the rump of Isis or similar groups, roaming the world as mercenaries.

Many might assume they will be imprisoned. But prisons are key sites for recruitment and radicalisation. Abu Bakr al-Baghdadi, the Isis founder, was a two-bit nobody until he landed in an American prison in Iraq. The humiliation he experienced at the hands of US forces motivated his founding of Isis. Prisons in the UK, Belgium and France still have problems, so unless failures in the system are addressed, it is not a safe bet for returnees or the rest of us. In fact it could enable them to recruit a new cadre of supporters.

They could be rehabilitated into their communities. Many governments are running de-radicalisation programmes, in the hope that these can reintegrate returnees. But the success rates are shaky, in part because governments are not adept at addressing the complex psycho-social and emotional dimensions of de-radicalisation. Global experience indicates that programmes are most effective when they are led by, and involve, local communities and the families of returnees.

In Pakistan the Paiman Trust, a non-governmental organisation, combines psycho-social care with religious literacy, livelihood-skills training and even civic education to teach the reforming Taliban about their multiple identities and cultures as Pakistanis, Pathans and Muslims. In Iraq the Firdaus Foundation combines care with instruction. “I tell them jihad is not spilling blood on the streets, it is giving blood in hospitals,” says its founder, Fatima al-Bahadly.

Recognising their humanity is at the core of any of these programmes. “I wish them happy birthday, because no one has ever done that. They call me Baba,” says Shafqat Khan, of the Paiman Trust. It turns out caring brings the best outcomes. But it is painstaking work, and families can face tremendous stigma. Some may be ashamed to reclaim sons – and especially daughters – who have transgressed acceptable social norms. Others may be fearful of constant police surveillance. There is doubtless much anger, pain and sense of betrayal.

In the UK, whatever is done must be done mindfully. To avoid a backlash against minority communities, the government and media must emphasise that these returnees represent a minuscule minority of the 2.7 million Muslims in the UK. Some Muslims, like any other Britons, may have felt similar grievances as those who were radicalised, but they have gone on to lead normal lives – so rehabilitation programmes cannot be perceived as rewarding violence.

If we fall victim to this sort of thinking, we become that which we abhor and fear

Of course, we must be mindful of the pain of victims. Some may seek justice while clinging to their anger and pain. Others may wish to forgive, to escape the branding of victimhood. Many may seek solace in creating memorials to their dead. Whatever they choose, their right to speak for themselves must be upheld.

Ultimately, we must be mindful of our own humanity. Extremists can be violent because they separate themselves from “others”. They lose empathy and compassion. As we face the prospect of Isis returnees to the UK, we must challenge our own perceptions. It would be easy if they were all one-dimensional, Bond-movie bad guys – but they are not. If we fall victim to this sort of thinking, we become that which we abhor and fear.

Instead our collective task as a nation is to find our own deep well of decency and humanity, to be fair and compassionate, just and kind, and perhaps above all to care: about the victims, the perpetrators, and those who are both victim and perpetrator.

• Sanam Naraghi Anderlini is the co-founder and executive director of the International Civil Society Action Network