For more than a century, Dabiq was one of northern Syria’s forsaken villages, a speck on a vast agricultural plain between the Turkish border and the deserts of Iraq, which hardly seemed likely to shape the fate of nations. A weathered sign at its entrance said 4,000 people lived there, most of whom appeared to have left by 2013, driven out over time by a lack of work – and lately by insurrection. For the first three years of Syria’s civil war, the arrival of a strange car would lure bored children to the town’s otherwise empty streets, scattering cats and chickens as they scampered after it. Little else moved.

Dabiq’s few remaining men worked on the odd building project: a half-finished mosque, a humble house for one local who had just returned after 10 years labouring in Lebanon, or a fence for the shrine that was the town’s only showpiece – the tomb of Sulayman ibn Abd al-Malik. The Ummayad caliph was buried under a mound of earth in 717, which over many centuries had somehow grown into a small hill. The war was happening elsewhere, it seemed.

Martin Churlov on why Isis fights - audio long read Read more

That was until the jihadists of Islamic State (Isis) arrived in early 2014, an event that the Dabiq elders had feared from the moment the war began – and which the new arrivals had anticipated for much longer. To the foreigners, and the leaders of the new militant juggernaut who were beckoning them, the war had by then entered a new phase that would transform the tussle for power in Syria into something far more grand and important. For them, the conflict that was slicing the country apart was not merely, as the Syrian opposition had seen it, a modern struggle between a ruthless state and a restive underclass. The jihadis instead saw themselves at the vanguard of a war that many among them believed had been preordained in the formative days of Islam.

One of the earliest sayings of the Prophet Muhammad – a hadith – mentions Dabiq as the location of a fateful showdown between Christians and Muslims which will be a precursor to the apocalypse. According to another prophecy, this confrontation will come after a period of truce between Muslims and Christians, during which Muslims – and only puritanical Sunnis fit the definition – would fight an undefined enemy, which in northern Syria today is deemed to be “Persians”.

“The Hour will not be established until the Romans [Christians] land at Dabiq,” the hadith says. “Then an army from Medina of the best people on the earth at that time will leave for them … So they will fight them. Then one third of [the fighters] will flee; Allah will never forgive them. One third will be killed; they will be the best martyrs with Allah. And one third will conquer them; they will never be afflicted with sorrow. Then they will conquer Constantinople.”

Now, close to 1,500 years later, have come waves of fighters who paid strict heed to these prophecies – and see the rise of Islamic State as a crucial turning point in a centuries-long battle of civilisations. For their purposes, the “Persians” today are not simply Iran, but also the Alawite regime that controls Syria and the Shia militias from around the region who have come to its defence.

Isis: the inside story | Martin Chulov Read more

The jihadis started to arrive in the summer of 2012, more than one year into Syria’s war, which had by then started to tip in favour of a ramshackle opposition that was locked into ousting Bashar al-Assad at all costs. Over the following six months, the foreigners came from all points of the globe, gradually asserting their will over opposition groups that were failing to press home their early gains on the battlefield and offered no convincing plan for the type of society that would eventually emerge from Syria’s ruins.

One man in Dabiq recalled to me the day that the war for the north was lost to the jihadis. “They came in a column of trucks one day early last year. They said nothing. They just set themselves up at the mosque,” he said in May 2014. “Now everyone knows where Dabiq is. We are why they are destroying the whole region.”

“We know about the prophecy, of course we do,” another Dabiq local told me, sitting on the concrete floor of his home in late 2013. “But we are hoping that it is just legend. God willing they will leave us alone.” The man’s faith was misplaced. Within three months, Isis had set up a command post among rows of concrete homes, and was sending hundreds of its fighters and their families to relocate there.

Dabiq, which has been essentially inaccessible to journalists since that conversation, is now one of three main focal points of the war the group is waging on the region. Raqqa in eastern Syria is Isis’s strategic hub, and Mosul in Iraq is its greatest conquest. But Dabiq is the place that allows the group to underpin its rampage with theology. In the eyes of Isis, the reference to the town in Islamic teachings gives the group’s rampage an incontestable mandate – a powerful thing to table when you’re trying to impose a new world order. And it appears to be working. To the estimated 20,000 foreigners who have travelled to join the so-called Islamic caliphate, declared last June by the Isis leader Abu Bakr al-Baghdadi, the symbolism of Dabiq is one of the jihadis’ most alluring calling cards. The group has even named its online magazine in the town’s honour.

Islamic State have threatened my father, seized my house, killed our animals and stolen our war

Many of Dabiq’s new residents have taken prominent roles in the legions of Arab and western Muslims who have helped turn Isis into the potent and terrifying ideological force that it now represents. “They’ve moved into our homes,” said a fighter from the Islamic Front, a conservative grouping of the armed Syrian opposition that is opposed to Isis. Like all other Dabiq locals, he feared the jihadis in their midst and would only speak openly with the protection of a nom de guerre. “They have threatened my father, seized my house, killed our animals and stolen our war,” he said. “Our fight with them is as big as it is with the regime.”

By mid-2015, Dabiq itself was draped in the group’s iconography, black flags flying above all its mosques and civic buildings. Many of its homes have been painted with the familiar black backdrop and white Islamic creed that Isis uses as its calling card. Columns of fighters come and go from the town, the population of which has more than doubled since Isis took over. Nearly all the locals have left, however, surrendering their vegetable farms to the marauders, who dress in ankle-length gelabiyas and eschew most of the trappings of modern life. Many wear ammunition belts around their chests. Most carry weapons. The tomb of Sulayman ibn Abd al-Malik has been destroyed, as have all other graves not considered modest enough. Save for the utility trucks, generators and modern weapons, everything else in town now has the feel of 7th-century frugality.

* * *

This is the story of why men from all over the world have chosen to fight in a brutal and apocalyptic war; of what drew them to the battlefields of Iraq and Syria; and of what has kept many of them there as Europe and the west have scrambled to stem the flow, first of their own nationals fleeing to join Isis and now of millions of refugees fleeing the other way.

Facebook Twitter Pinterest A fighter films an Isis military parade in Raqqa province, Syria. Photograph: Reuters

It is told largely by five men with whom I have spoken, at some length, over the past four years, inside Syria and Iraq. Their motivations are similar, but in some cases they are diverse and contradictory. All of them draw at least some inspiration from the prophecy of an epochal confrontation in Dabiq; they see themselves as underdogs, fired by a sense of divine mission. Individually, each man painted a distinct portrait of his reasons for joining a movement that is fast causing the collapse of an order that has bound the region together for centuries, and posing a direct challenge to all the Middle East’s current forms of governance, threatening autocracies, monarchies and quasi-democracies alike.

All of these men believed that by travelling to fight for the caliphate, they were standard-bearers of their faith. They also felt sure they were acting to restore Islam to its lost glories – and had a sense of privilege and pride that their generation was the one that had been chosen to right the wrongs of the past. These sentiments are shared by many others I have met: two senior Isis members who have been captured by Iraqi forces and are now facing death sentences; a Syria-based Tunisian fighter who believes his duty is to obey the orders of his superiors with unswerving servility; and even one former member of a mainstream rebel militia, who joined the ranks of his jihadi foes when he realised the battle was turning in their favour.

But they also had myriad other reasons for joining the terror group that had little to do with their understanding of Islamic scripture or any sense of holy war. Some saw themselves as victims of oppression, others as sons of dispossessed families. Another thought of himself as a cultural warrior, not a holy warrior: he argued that joining the jihad was an entirely practical obligation, necessary to restore the caliphate and bring on the prophecy of the end times.

Few were untouched by a yearning for the collective memory of the early centuries of Islam, alongside contemporary grievances about a humiliating loss of power at the hands of the west in recent years. By late 2014, they were all fighting under the banner of the most radical and dangerous jihadi group to have formed in the past 30 years. And Dabiq was now ground zero for their struggle.

* * *

In February 2013, I was a few miles from the Turkish border, standing on a road outside a government office that rebel fighters had just commandeered as a base, and inspecting the ruins of a Syrian army tank that had been destroyed in a battle a few days earlier. The rebels who had taken the office warned me that the building next door had been occupied by foreigners who had crossed the border to fight in Syria. Isis had not yet formed, but the men I could see inside that building, darting between the windows and the stairwells, would join the group when it raised its colours several months later.

By early 2013, foreign fighters from around the world were converging in the rolling hills of the Jebel al-Akrad region of north-western Syria, 200 miles west of Dabiq. The men had commandeered homes of Alawite families who had been forced to flee from their path. The jihadis had taken refuge among elements of the Free Syrian Army, who in the weeks prior had pushed the Syrian army south towards the regime stronghold of Latakia. As I looked at the tank, one of these foreigners walked down a small hill towards where I stood on the road, with a Kalashnikov strapped across his chest and menace in his stride. He asked for my identification, which he refused to return. I asked him what had caused him to leave his life and travel to Syria.

“Omar and Ali – is that your question?” came his enigmatic reply. “Omar” is traditionally a Sunni name; “Ali” is identified with Shia Islam. The fighter, who called himself Abu Muhammad, had immediately made the sectarian nature of his cause clear, and I soon learned that he and the other jihadis occupying the formerly Alawite houses nearby had erased any signs of iconography from their walls, painting them over with graffiti touting the superiority of Sunni Islam.

A 30-year-old Lebanese national, Abu Muhammad had four wives, 10 children and an American education, and he was now trying to detain me on suspicion of being a spy. “There are reasons for us fighting now,” he said in perfect English. “All of this was destined to happen.”

After an uneasy standoff on the road, where we were soon joined by armed members of the rebel group that was hosting me, Abu Muhammad calculated that taking me hostage would perhaps be unwise. So he invited me for tea instead, and we settled into plastic chairs under the house his group was using as a base. We talked more about his belief that those who lived in a western economy, earned a wage, paid taxes and took part in a community life that was not Islamic were just as deviant as those who had renounced their faith. For him, there was no room for compromise on what made a person worthy of an afterlife, or eternal damnation.

“This will be a war against a powerful enemy,” he said. “And the Muslims will win. You are here on a humanitarian mission, so you can leave. But don’t stay long.” I did not, but over the next 18 months, in five more trips to northern Syria, I witnessed the relentless rise of the jihadis in Idlib and Aleppo provinces. They steadily captured swaths of land in both provinces, particularly in the countryside, imposing their will with an increasing ruthlessness and defying the writ of the other rebel units, who had their guns trained on Assad’s army, and wanted a new nation-state to rise from whatever was left of Syria. The jihadis saw Assad as part of the problem, but they had a bigger goal – and that meant subjugating the rebel cause. Wherever they were able, they were transforming the battle for Syria’s destiny from a fight against one type of tyranny into nihilistic chaos.

By the time another young jihadi, Abu Issa, was freed from Aleppo’s central prison in late 2011, the Trojan horse act that was Isis was well under way – fuelled by Turkey’s porous borders, the savagery of the Syrian regime, feckless attempts to organise opposition fighters into a cohesive force, and the release of militant prisoners like himself. A Syrian with historical links to the group’s earliest incarnation, al-Qaida in Iraq, Abu Issa was released along with dozens of men like him as part of an amnesty given by Assad to Islamist detainees, which was touted by the regime as a reconciliation with men who had long fought against them.

Most of the accused al-Qaida men had been in the infamous Syrian prison system for many years before the uprising against Assad began. “We were in the worst dungeons in Syria,” said Abu Issa, who was a member of the various forerunners of Isis, and fought against the US army in 2004 and 2005 before fleeing Baghdad in 2006. “If you were charged with our crimes, you were sent to Political Security prison, Saydnaya in Damascus or Air Force Intelligence in Aleppo. You could not even speak to the guards there. It was just brutality and fear.”

But several months before Abu Issa was released, he and a large group of other jihadis were moved from their isolation cells elsewhere in the country and flown to Aleppo’s main prison, where they enjoyed a more communal and comfortable life. “It was like a hotel,” he said. “We couldn’t believe it. There were cigarettes, blankets, anything you wanted. You could even get girls.” Soon the detainees were puzzled by another prison oddity, the arrival of university students who had been arrested in Aleppo for protesting against the Assad regime.

“They were kids with posters and they were being sent to prison with the jihadis,” he said. “One of them was a communist and he talked about his views to everyone. There was a guy from al-Qaida in the prison and he was usually very polite but he got angry with this guy. He said if he saw him again he would kill him.” Abu Issa and the other Islamist detainees soon formed the view that they had been moved to the Aleppo prison for a reason – to instil a harder ideological line into the university students, who back then were at the vanguard of the uprising in Syria’s largest city.

On the same day that Abu Issa and many of his friends were released, the Lebanese government, which is supported by Damascus, also freed more than 70 jihadis, many of whom had been convicted of terrorism offences and were serving lengthy terms. The release puzzled western officials in Beirut who had been monitoring the fates of many of the accused jihadis in Lebanon’s jails for more than four years. Some had been directly linked to a deadly jihadi uprising in the Nahr al-Bared Palestinian refugee camp in July 2007, which led to 190 Lebanese soldiers being killed in battle and much of the camp destroyed. The claim that the Syrian regime aided the rise of extremism to splinter the opposition and reaffirm its own narrative that the war was all about terrorism in the first place has been widely repeated throughout the past five years. It is a central grievance of the mainstream opposition in Syria’s north, which says it lost more than 1,500 of its men ousting Isis from Idlib and Aleppo in early 2014. At the same time as the opposition was fighting the jihadis, the Syrian regime, which did not intervene, was able to advance around the city for the first time in the war. “There was no other reason for Salafi jihadis to be in that jail, and for the students to be with us,” said Abu Issa, who now lives in exile in Turkey. “They wanted them to be radicalised. If this stayed as a street protest, it would have toppled [the regime] within months, and they knew it.”

Among the jihadis, there was initially no talk about why they were being freed, Abu Issa said. Just relief to have somehow made it out of a system that had swallowed other accused terrorists for decades. “Nobody wanted to acknowledge it, at first,” he said. “But in time everyone knew what was happening. There were some very important terrorists freed that day. They did what was expected of them and went straight to join the fight against the regime. That was the first moment when the war stopped being about civil rights.”

* * *

By early 2013, the jihadis had also set up boot camps just inside the Syrian border; several of which were within two miles of the main crossings from Turkey. A Saudi fighter named Gosowan ran the camps from the nearby town of Azaz. New recruits were given 30 days’ basic training and intensive Qur’anic lessons, then sent to the front lines. A huge Turkish flag, around the size of a two-storey building, flew over the nearby border post.

How Isis crippled al-Qaida | Shiv Malik, Ali Younes, Spencer Ackerman, Mustafa Khalili Read more

It was around this time that I met an Iraqi jihadi named Abu Ismael, who was not shy about his own past. “I was a member of the al-Qaida organisation from 2005-11,” he said, his black eyes set in an unflinching stare. “I joined them with my father when I was 16, and apart from one and a half months in prison, I was very active in every way.” Now 23, he had made his way to al-Bab in Aleppo province in the second half of 2012 and been accepted as an auxiliary fighter by a local opposition unit, Liwa al-Tawheed. “We don’t trust al-Qaida,” the group’s leader, Sheikh Omar Othman, said at the time. “They don’t want what we want, but as Muslims we must accept wayfarers, especially if they come to help.”

Abu Ismael said he was one of many Iraqis who had travelled to Syria. For him, and others like him, the civil war was an extension of the same fault line over which Iraq had been torn in two between 2005 and 2007 – a power struggle between vanquished Sunnis and ascendant Shias. Though the battle lines were drawn on a very modern political rivalry, Abu Ismael told me he believed they were rooted in the historical split between the sects that had taken place in Mesopotamia more than a thousand years earlier. “There are around 50 Iraqis in each area of northern Syria. Perhaps more,” he said. “It was not difficult to get here and it is not hard to find other mujahideen. We can fight where we want to and when we want to. And God willing we will prevail.”

In early 2012, I met another man, called Abu Ahmed, who had also come through the furnace of the Iraqi insurgency, similarly drawn into militancy by the belief that Sunnis had suffered a devastating loss of power in the wake of the American invasion. He had been affiliated with the group from its earliest days – and described to me how they had organised themselves during the US occupation of Iraq, using the Camp Bucca prison as an incubator for the decade of terror that was to follow. “By 2010, [the insurgency in Iraq] wasn’t working out,” he said. “But then we became energised again.”

It was the second half of 2012 in Syria, when Iraqis like Abu Ismael came to join the fight, that had been critical for Isis, Abu Ahmed later told me: these were the months that pulled together all that the forerunners of the group had tried, and failed, to achieve in the prior 10 years. “There were some who had lost hope, others who had drifted away,” he said. “But now it was coming together. People that had scattered were now being drawn back in.”

Some Iraqi veterans had been fighting with regular opposition units in Syria, others were in Syrian prisons. Yet more had grown up and moved on. And others, like Abu Ahmed, had disavowed much of the dogma associated with Isis and dreaded the inevitable call from the men who led the now revitalised group. The reunion was a match of competing motivations, much like the arrival of the new crop of fighters.

On every flight I took on one of the two routes from May 2012 to May 2014, there were at least five jihadis on board

By April 2013, the number of Iraqis fighting in Syria had reached at least 5,000 and was growing daily. Iraqi veterans of the fight against the US occupation, and the sectarian war against the Shias, had crossed the border and were taking leadership positions in a new group that would soon subsume the most organised and capable jihadi outfit in Syria, Jabhat al-Nusra. Throughout that year, newcomers in jihadi battle dress were regular features, both in the war zones along the Turkish border, and on flights from Istanbul to Gaziantep or Antakya, the two main staging posts for fighters wanting to cross into Syria.

On every flight I took on one of the two routes from May 2012 to May 2014, there were at least five jihadis on board, clearly on their way to join the fight. Most refused to sit near women; some had Qur’anic recitations as ringtones; and none were shy about where they were going. They got on and off the plane with no trouble and, according to drivers who were sent to meet them, usually headed straight from the airport to the border. “I took four guys one week and two the next,” Suleiman Cenar, a taxi driver based in Antakya, told me in September 2013. “They knew the GPS coordinates of where they wanted to go. I dropped them by the side of the road and they walked through the forest with their belongings.”

Central to its growth was the arrival some months earlier of an elderly man with a grey beard who set up home in the nondescript northern Syrian town of Tal Rifaat. The newcomer’s name was Samer al-Khlifawi. He arrived with a wife and a blueprint for how to run a security state that he had learned from his days as a colonel in Saddam Hussein’s air force. Khlifawi, like every other member of Saddam’s armed forces, lost his job, his pension, and any chance of meaningful employment after US viceroy Paul Bremer disbanded the Iraqi military and outlawed the Ba’ath party, to which many of its members – especially its senior officers – belonged.

Facebook Twitter Pinterest An Isis fighter distributes soft drinks, biscuits and religious pamphlets to local people in Tel Abyad, northern Syria. Photograph: AP

In the years immediately following his sacking, Khlifawi, along with dozens of other Ba’athists, steadily got organising. Some joined the anti-US insurgency, which at that point was forming more or less along Islamic lines. Others, like him, formed their own networks and established bonds with Ba’athists in Syria, who offered refuge and helped with supply lines. By about 2007 the Islamist groups, among them Salafist jihadi outfits such as al-Qaida in Iraq (AQI), had allied with some of the Ba’athists – an alliance that would never have been possible under Saddam, who saw organised jihadis as one of the biggest threats to his rule.

The bond gave the jihadis a tactical guile and the Ba’athists a military muscle that neither could have boasted without the other. As AQI, then the Islamic State of Iraq, and now Isis evolved, this bond has been central to nearly all of their achievements. And Khlifawi, who had managed to stay underground for nearly a decade after the fall of Baghdad, was increasingly front and centre.

As soon as Khlifawi arrived in Tal Rifaat, he started laying down roots for Isis. His goal was to establish systems and structures that would help Isis eventually take over the communities in which people like him had arrived. Around 50 Iraqis, most trusted veterans of the insurgency like Khlifawi, or in some cases their sons, were soon dispatched to Syria and given the job of infiltrating the tribal and community life of their adopted homes. Khlifawi drew up documents, which were later revealed by Christoph Reuter in Der Spiegel, that showed how he planned, with clinical efficiency, to subvert the communities of the north. He encouraged the young Iraqis to set up charities that would be used as fronts, to identify the most powerful tribes and clans and to try to marry into them. Rival power bases were also to be pointed out – a precursor to them being eliminated when the time was right. The communities who had accepted the strangers as wayfarers wanting to help them did not see it coming.

“One day in January, they just raised a black flag,” said Abu Abdullah, an opposition fighter from Tal Rifaat. “Nobody knew what to do.”

Within months, the pieces were sufficiently in place for Baghdadi to start his move. He announced in April that Jabhat al-Nusra, the al-Qaida-aligned jihadi group, would be subsumed by the newly named Isis. That same afternoon, Baghdadi’s men, most of them Iraqis like Abu Ismael, rode into central Aleppo and kicked al-Nusra members out of their main base in the city’s eye hospital. They then painted it black and took it over.

Across northern Syria, the scene was repeated with ruthless efficiency. It was the first of two bold forays that demonstrated to the Syrian opposition and to the region that Isis had become an organisation that matched its words with deeds. “That was a very important time for us,” I was told by another Isis member, Abu Saleh. Now based in Falluja, he had grown up in Muslim Brotherhood circles in Baghdad, and joined dozens of his friends in the west of the capital as the anti-US insurgency grew after 2003. Once a street-smart and risk-taking youth, he had become a true believer in what Isis was fighting for – though he freely admitted to me that his affection for western trappings like cars, technology and weapons was sometimes difficult to reconcile with the frugal ways his leaders demanded of him. But he too had been energised by the struggle spilling across the border. “Things had not always gone well in Iraq,” he said. “There had been mistakes. And we had to be patient. But now Syria had helped us revive ourselves. It would also revive the caliphate.”

In August 2015 Isis announced that they had destroyed the temple of Baal Shamin in Palmyra, Syria. Photograph: Rex Shutterstock

* * *

Shortly after Isis ousted Jabhat al-Nusra in April 2013, Abu Muhammad, the Lebanese fighter who had tried to detain me in northern Syria, was killed while participating in an attack on a regime air base near the Turkish border. He had foreshadowed his own death during our long conversation two months earlier. “I want this more than you want life,” he had said. “This is our destiny.”

Abu Ahmed, with whom I remain in regular contact, became more involved with Isis from mid-2013. He remains disaffected with the group, which he believes has strayed well beyond its original remit of fighting the US army and defending Sunnis against their marginalisation in post-Saddam Iraq. But even with his reluctance, he still believes that he too is helping to restore lost glories – of both ancient Islamic civilisation and a more recent era of Sunni power – by fighting against Iran and the Assad regime. “This is just a reality,” he said. “The Americans are working with Iran against the Sunnis. This is not a conspiracy theory.”

Abu Ismael is now an emir in eastern Syria, having – perhaps unwittingly – played a key role in the subjugation by Isis of much of the north. His remit has taken him to Hama and to Palmyra, north-west of Damascus, where Isis fighters have systematically destroyed one of the most important archaeological sites in the world, in their bid to revert the region to an Islamic year zero.

In Falluja, Abu Saleh, the young jihadi from Baghdad, remains on the front lines, committed to a cause that he insists is righteous. “All of this, the Iranian invasion, the Americans coming, the fall of Baghdad and the rise of Dabiq, was predicted. We will not stop until we win in the name of Allah.”

Abu Issa, meanwhile, is trying to make a living in Turkey. Many friends from his younger days in the jihadi movement are still in regular contact with him, as are the men he spent prison time with – an amalgam of Muslim Brotherhood types, men who dabbled with al-Qaida, others who were drawn to fight by perceptions of injustice, and many more who, when they started protesting in 2011, saw no other cause except having a voice in an inclusive government.

“Some of them became jihadis, just like the regime wanted,” Abu Issa told me. “But most faded away and lost hope. It’s mostly the jihadis who have hope now. They have lots of themes to believe in. And they choose which one suits them.”

Additional reporting by Saalim Rizk

• Follow the Long Read on Twitter at @gdnlongread, or sign up to the long read weekly email here