L ucas Glass had not long finished school when he decided to join Isis. In the summer of 2014, shortly after the terror group declared its global caliphate, he left his home city of Dortmund and set off with his wife to start a new life in Syria. He was just 19 years old.

“All I knew about Isis was that they were establishing Islamic law and fighting Bashar al-Assad,” he says, cutting a solemn figure under the watchful eye of his captors at a military installation in northern Syria.

“I came to practise my religion. I thought I would find what I wanted here, but actually it was very different.”

Glass, a German citizen, now 23, is one of thousands of foreigners who came to this country in the throes of a brutal civil war to live under the strict interpretation of Islam that Isis promised its followers. That is not all they did, however. Many played a key role in the group’s reign of terror, acting as soldiers, executioners and recruiters.

Over the past few months, as the caliphate nears its end, hundreds of foreign nationals have been detained by the Syrian Democratic Forces as they leave the ever-shrinking territory of Isis. But their capture is just the start of a complex process which has no clear end in sight.

"War of Annihilation" – devastating toll on civilians in Raqqa, Syria Show all 20 1 /20 "War of Annihilation" – devastating toll on civilians in Raqqa, Syria "War of Annihilation" – devastating toll on civilians in Raqqa, Syria A child injured by an IED explosion in Raqqa Amnesty International "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Children riding a bicycle among destroyed buildings in Raqqa Amnesty International "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Entire neighbourhoods in Raqqa are damaged beyond repair Amnesty International "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Satellite image showing the house where seven members of the Badran family were killed in a Coalition strike on 18 July 2017, before the strike CNES/Airbus DS "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Satellite image showing the house where seven members of the Badran family were killed in a Coalition strike on 18 July 2017, after the strike CNES/Airbus DS "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Members of the Badran family killed in three separate Coalition air strike on 18 July and 20 August 2017 in Raqqa Amnesty International "War of Annihilation" – devastating toll on civilians in Raqqa, Syria The city of Raqqa in northern Syria has become hardly recognizable to those who try to return after months battle between US-backed forces and the Islamic State terrorist group for control of it. The city has no running water or electricity and homes, business and public squares are mere rubble and debris Amnesty International "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Satellite image showing the houses where 16 members of the Fayad family and neighbours were killed in Coalition strikes on 12 October 2017, before the strike CNES/Airbus DS "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Satellite image showing the houses where 16 members of the Fayad family and neighbours were killed in Coalition strikes on 12 October 2017, after the strike CNES/Airbus DS "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Fayad Mohammed and his daughters Wafa’, Fadda and Tamam; Ammar al-Faris; Reem al-Maddad, Yusra Abd-al-Aziz, and baby Razqiya Habib; Jasim Hamal and Salem Hamad. They were among the 16 civilians killed in Coalition air strikes on 12 October 2017 in Raqqa Amnesty International "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Men wait by the side of the road for casual labour in Raqqa. Many end up clearing partially destroyed or damaged buildings, a very risky endeavour as many building were mined by IS and civilians are frequently killed and injured by mines Amnesty "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Satellite images showing the Aswad family’s building before it was destroyed in a Coalition air strike which killed eight civilians, five of them children, on 28 June 2017 CNES/Airbus DS "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Satellite image showing the Aswad family’s building after it was destroyed in a Coalition air strike which killed eight civilians, five of them children, on 28 June 2017 CNES/Airbus DS "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Amal Othman, 13, and her brothers Ammar, 8 and Mahmoud, 17; and Jamal Aswad, 41 – four of the eight victims killed in a Coalition air strike on 28 June 2017 in Raqqa Amnesty International "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Low-income district west of the Jezra intersection on the western outskirts of Raqqa city destroyed by the Coalition shelling started in June 2017 Amnesty International "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Satellite image showing the houses where 16 members of the Fayad family and neighbours were killed in Coalition strikes on 12 October 2017, before the strike CNES/Airbus DS "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Satellite image showing the houses where 16 members of the Fayad family and neighbours were killed in Coalition strikes on 12 October 2017, after the strike CNES/Airbus DS "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Ali Hassan Nafa; Mahdia Hashish and her husband Hussein Ali; Hussein Hashish, Mohammed Hashish and Hussein Ibrahim Hashish, and Mohammed Ali Hashish Amnesty International "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Harat al Badu, a built up area in central Raqqa, next to the stadium. It was the scene of the final battle in the city between SDF/Coalition forces and IS Amnesty International "War of Annihilation" – devastating toll on civilians in Raqqa, Syria Map showing where the Badran, Hashish, Aswad and Fayab families were living before the coalition air strikes Unosat /Amnesty International

Most countries do not want to take back those citizens who left to join the caliphate, fearing they would be a security threat if they returned. Prosecuting them is extremely difficult due to a lack of evidence of what individuals did during their time living with Isis.

Foreigners leaving the caliphate know this, and the majority claim they had nothing to do with the group or were not fighters. They say they were cooks, doctors or humanitarians who simply found themselves in the caliphate by accident.

“They all say the same thing,” a Kurdish intelligence official responsible for handling suspected Isis members tells The Independent. “We don’t believe them.”

Glass is not one of those people. He admits to being a member of Isis, and to working for its police force for two years. But he claims he was duped by its propaganda, and did not discover the group’s true nature until it was too late.

Glass’ story gives an insight into the inner workings of one the most feared groups in the modern world, and the disillusionment of many of its followers as its fortunes started to decline.

In an exclusive interview with The Independent, he recounts the tale of how he came to join Isis, and how it all fell apart.

“You can compare it with a US soldier who wants to join the army,” he says of his motivation for joining the group, speaking in accented English. “Why is he ready to join the US army, and go to Afghanistan or Iraq or Syria to sacrifice his life for the sake of democracy? We heard that they announced an Islamic State, this is what we came for,” he says.

SDF fighters gather near the frontline against Isis in the village of Baghouz Tahtani, eastern Syria (Richard Hall/The Independent ) (Richard Hall/The Independent)

Glass converted to Islam in 2010, some 10 years after his mother had done the same. He had been familiar with the religion for most of this life, but it wasn’t until he got older that he discovered his faith. But he says he felt Germany did not afford him the space to live the religious life he wanted to.

In July 2014, Isis leader Abu Bakr al-Baghdadi issued a call to Muslims around the world to come to Syria and Iraq to build an Islamic state. “Rush O Muslims to your state. Yes, it is your state. Rush, because Syria is not for the Syrians, and Iraq is not for the Iraqis,” he said in an audio message.

Those words hit home with Glass. He felt it was his duty to go. He married his German wife, and a month later they traveled to Turkey, where he paid a smuggler to take him across the border into Syria. Shortly after, he found himself enrolled at an Isis religious school.

“There were 400 of us in one camp. People from Germany, France, Belgium, Britain, north African countries,” he says.

It is simply not plausible to suggest that there was any doubt over Isis’s true nature in 2014 Shiraz Maher, director at the International Centre for the Study of Radicalisation and Political Violence

Glass wanted to fight for the group, against the Syrian government, but an injury meant he was unfit for the frontline. Instead, he was assigned to the police force in Aleppo province.

“The main work was manning checkpoints in the streets. I would stop cars and look out for cigarettes and drugs,” he says. “I never pointed my gun at another human,” he insists.

He did this job for two years, he says. Life was as close to normal as it could be for a German living in an active warzone. But by 2016 Isis had gained enemies on all sides in Syria’s civil war, and began to lose ground in Aleppo to the Syrian opposition. Its fighters withdrew from Aleppo to Raqqa; Glass and his family, which now included children, went with them.

Throughout the time Glass was a member of the Isis police force, the group carried out some of its most heinous atrocities. In August 2014, Isis fighters overran the Iraqi town of Sinjar, where it massacred Yazidi civilians and kidnapped thousands of women to keep as sex slaves. Shortly after, Isis members killed the American journalist James Foley. Then in September they released videos showing the beheading of American-Israeli journalist Steven Sotloff, and then the execution of British aid worker David Haines. All of these were designed to maximise publicity, shared on Isis propaganda channels, and aimed at shocking the world and instilling fear in its enemies.

Glass continued to do his job, manning checkpoints for Isis while the group wrought havoc across the region. He insists he did not know these crimes were being committed, despite their widespread publication. It wasn’t until 2016, in Raqqa, that he says he had a change of heart.

“I had seen some stuff going on in Isis which I don’t accept, which I thought was un-Islamic,” he says.

“Some of the propaganda videos of Isis, burning people, drowning them. I got shocked when I saw these things. This is not allowed in Islam. These were things I don’t accept,” he says. “After that, I decided to leave.”

Thousands of Syrians flee last Isis territory: Richard Hall meets families fleeing from the once mighty caliphate in its dying days

By the time Glass says he realised the truth about the group, Isis was carrying out deadly attacks far beyond its borders. In France, the US and Tunisia, Isis-inspired attacks killed hundreds. But Isis was also on the back foot in Iraq and Syria, losing ground in both countries. The US had entered the conflict and was bombing intensively across Isis’s self-declared caliphate.

“I just asked to leave,” says Glass. “They give you a paper and you get stamps from the people who are responsible for you. From this day I lived as a civilian,” but still within the caliphate.

“I didn’t want to be a part of Isis anymore. I wanted to be innocent of these things,” he adds.

Glass says he tried to escape once with his family but was caught by the Isis secret police.

“They imprisoned me for one and a half months. They released me under the condition that if I tried to leave a second time they would kill me,” he says.

From that moment on, as he tells it, he was a prisoner of Isis, and was forced to retreat as they retreated, from Raqqa to Deir ez-Zor. The Isis caliphate got smaller and smaller, its fighters faced defeat after defeat. Eventually, a string of villages along the Euphrates became the last holdout of the group.

The SDF, with US backing, launched its offensive on this last stronghold in December. The caliphate was surrounded, and battered by daily airstrikes, as Isis made its last stand.

“I remember a few times, me and my family and my children we went to the market, and there was bombing next to us, and I saw in front of my eyes women and children, gone, arms gone, head gone,” he says. “You didn’t know what would happen tomorrow. Every moment you expected to die.”

In the past months, an exodus of people have fled the Isis-held areas. The group’s usually tight control over who comes and goes has seemingly collapsed. Thousands of women and children were among those fleeing, many of them believed to be the relatives of Isis fighters.

Glass says there was a sense of abandonment among Isis supporters and fighters when the group’s leaders were suddenly nowhere to be found.

“Everybody was asking this question. Where are they? Why don’t they show themselves? They claim to be responsible for us, for the Muslims, why don’t they help us? The majority of people in Isis areas, even the majority of Isis fighters, hate them,” he says.

Glass was eventually captured as he crossed the front lines east of the town of Susah on 6 January. He was separated from his family and remains in detention to this day. His wife and children are currently being held with thousands of other families of suspected Isis members in a holding camp.

What comes next for him, and the thousands of other foreign prisoners held by the SDF, is unclear. The Syrian Democratic Forces is calling on foreign countries to take back their citizens who came here to join Isis. So far, France is the only European country to say it will bring them back. The US has also said it will try citizens suspected of Isis membership at home. The UK, meanwhile, has refused to allow its citizens to return. Defence secretary Gavin Williamson said last year: “I do not believe that any terrorist, whether they come from this country or any other, should ever be allowed back into this country.” Germany has so far taken the same position.

“I hope Germany is going to take me back, but I don’t expect they will,” he says. “I expect they will hand us over to the Syrian government.”

It is likely he will face prosecution for belonging to Isis no matter where he ends up, even if he was not directly involved in killing, as he claims. But there will be many who don’t believe his story.

“It is simply not plausible to suggest that there was any doubt over Isis’s true nature in 2014. Indeed, by the end of January in that year the group was drawing heavy criticism from even other rebel groups for its barbarity,” says Shiraz Maher, an expert on foreign fighters in the Syrian conflict, and director at the International Centre for the Study of Radicalisation and Political Violence at King’s College London.

“It is true that individuals within Isis sometimes performed specialised roles, serving as doctors, engineers and so on, but interviews I conducted suggest that they did this in addition to holding combat roles. A prominent Australian doctor, Tarek Kamaleh, was revealed to be doing just that in Isis propaganda, alternating between his work as a doctor and serving on the front line,” he adds.

It will not be long before Isis loses the last of its territory, bringing an end to the caliphate in Iraq and Syria. Already, many here are preparing for what comes next. Isis has already begun to transform back into an insurgency, and has demonstrated its ability to carry out attacks.

But according to Glass, who once held the group in high esteem, it will never again be able to muster the same support it did four years ago.

“At the beginning, when they announced their caliphate, thousands of Muslims came to Syria to support it. But now we know the reality of Isis. They will not find any supporters anymore in the Muslim world. All these things Isis did, and all these crimes, made Muslims all over the world hate Isis. So it will never be able to find any supporters anymore,” he says.