On a midwinter night in early January, the most wanted man in the world entered a home in a forsaken town near the Syrian border for a rare meeting with his surviving aides.

Abu Bakr al-Baghdadi was down to a few dozen loyalists, all tested in battle and by the chaos of his organisation’s scrambling retreat to the far eastern edge of Syria. The caliphate he had proclaimed four and a half years earlier had been whittled down to less than 50 square kilometres and was shrinking by the day. Gunfire crackled in the middle distance and bombs thudded nearby, just as they had for months as the last towns and villages held by Islamic State fell steadily to the advancing Kurds.

Above the small town of Baghuz, where the terrorist group’s leader and his entourage were holed up, two US drones circled, searching for targets below. Several villages away, Kurdish forces were taking positions among the fresh rubble of still raging battles, readying for a final assault on the last holdout, a place that until very recently few could find on a map. The most diehard Isis members were preparing for what increasingly looked like being their last stand, a long and ignominious way from where it all began when its fighters swept into towns and cities across Iraq and Syria, capturing all before them and rendering the border between the two countries little more than a line in the dirt.

Baghuz, barely a speck on a bank of the Euphrates, was about to be etched into infamy. Inside the walls of the small home, Baghdadi, ailing, angry and paranoid, would face the biggest challenge yet to his authority. The small town would soon be known around the world as the place where Isis fought and lost its final battle, where the vainglory of the “caliphate” finally crumpled in defeat. But according to three intelligence agencies and two sources with detailed knowledge, it was the place where foreign fighters close to Baghdadi’s inner circle nearly succeeded in killing the leader.

Accounts of intelligence officers and people in Baghuz who spoke to the Guardian say Baghdadi and his guards were forced to flee when several men inside the small home opened fire. “We are certain about this,” one European intelligence source said. “We don’t know about his condition, but we do know there was an attempt to kill him.”

Alleged Islamic State group fighters who fled from the frontline Syrian village of Baghuz, near the Iraqi border, sit blindfolded in the back of a pickup truck after being taken into custody by SDF forces for screening, near the Omar oil field in the countryside of the eastern Syrian Deir Ezzor province on January 30, 2019. Photo credit: Delil Souleiman/AFP

According to regional and foreign intelligence officers, Baghdadi fled from Baghuz to the Syrian desert around January 7. Outside his immediate circle and the men who tried to kill him, very few knew he was there and even fewer know where he has gone since. The best guess of those who have hunted him and known him personally is that he has crossed the border into Iraq’s Anbar province, where the earliest incarnations of Isis gained momentum.

Last days

The enclave Baghdadi left behind finally fell over the weekend, after six weeks of gruelling battles and a seemingly never-ending departure of diehards who staggered from bunkers, rubble and tunnels in the ruins. Up to 50,000 people emerged from a corner of the town that was thought to hold no more than a few hundred holdouts with the scale of the exodus both stunning the victors and overwhelming camps that had been set up to house less than a quarter of their number. Some of the war’s newest refugees had news about the caliph who had left them to their fate, and now far more incentive to disclose what they knew.

Few in Baghuz knew what had happened when the gunfire erupted, but they later gained some sense of events when Isis members circulated a leaflet calling for the execution on sight of a leading foreigner, Abu Muath al-Jazairi. Locals who fled the town in February said something serious had clearly taken place. “We could not go outside,” said Jumah Hamdi Hamdan, 53, who had retreated to Baghuz from the nearby village of Keshma. “There were things we could not involve ourselves in. Baghdadi’s men were fighting north Africans. The danger was too high.”

Other witnesses, including the US woman Hoda Muthana, who was with the Isis vanguard on its scrambled retreat, said the fighting had started several months earlier in Keshma, a town that lies in near-total ruin, along with every other village in the area. “There were battles going on between the factions in Isis,” she said from a detention centre in eastern Syria. “There were a lot of Tunisians and Russians and there were two sheikhs who were tortured and executed. One was from Jordan and the other from Yemen. Isis was trying to wipe out anyone who criticised them.”

Destruction had been a calling card of Isis’s presence ever since Baghdadi proclaimed the group’s existence. Nearly every town and city it had occupied was decimated, both by the extremists themselves and coalition jets above that relentlessly battered their hideouts. Raqqa and Kobane in Syria were laid to waste and, across the river in Iraq, Falluja, Tikrit, Ramadi and Mosul remain broken and dysfunctional years after Isis was driven out.

People who fled the Islamic State group's last holdout of Baghouz, in Syria's northern Deir Ezzor province, wait in the back of a truck, on February 22, 2019. Photo credit: Bulent Kilic/AFP

On the road to Baghuz, enormous craters dot both sides of roads leading in an and out of every village. Ruined homes and factories are caked with concrete dust and trucks are scattered around like playground toys. Not one building appears to be intact.

Less visible, but even more significant, is the damage the Isis occupation has done to the local communities. “Our homes may be broken, but the toll on our young and old is worse,” said Radwan Shamsi, an elderly man who ran a shop in the Syrian town of al-Bab before fleeing to the al-Hawl refugee camp. “It is like trying to put an egg back together. May God damn them.”

Expansion and overreach

It wasn’t always this way. From the moment Baghdadi announced the formation of Isis on April 8, 2013, unilaterally declaring that the al-Qaida-aligned Jabhat al-Nusra had been subsumed into the group he led, until his proclamation of a caliphate from the Great Mosque of al-Nuri in Mosul in mid-2014, his organisation’s rise seemed unstoppable. The group had seized power through a classic Trojan horse act, sending senior members from Iraq to first infiltrate, then absorb communities in northern Syria. The rival jihadist group Jabhat al-Nusra was its first target, then any opposition group that stood in its way.

From Aleppo in Syria to Mosul in Iraq, Isis conquered its way. Five divisions of Iraq’s national army fled as 700 jihadists in pickup trucks advanced towards Mosul, and the border with Syria was rendered redundant. As with the 13th-century Mongols who conquered cities in modern-day Iraq and Syria, just the threat of Isis approaching was enough for tens of thousands of men to ditch their uniforms and weapons and leave. Kurdish peshmerga forces were soon in a race with Isis to secure the oil fields of Kirkuk, and only US airstrikes saved the Kurdish capital, Erbil, from an Isis incursion that could have changed the fate of northern Iraq.

Banks were looted and abandoned and US-supplied heavy weapons were seized in areas of Iraq under Isis’s control as it became the most cashed-up and well supplied startup in the region. It commandeered oil fields, sold crude to Damascus and Turkey and started levying taxes. Within months of Baghdadi’s appearance in Mosul, foreigners from all over the world were flowing in to fight for the so-called caliphate. An estimated 50,000 arrived in its territory. The blowback was not long coming for Europe, where borders had already been tested by huge flows of migrants, and the savagery of terrorism hatched inside Isis territory was about to be carried home.

Nothing, it seemed, would ever be the same again. By late 2014, the very fabric of the region had been tested. Iraq’s Nineveh plains, hailed as an ancient cradle of civilisation and a modern example of coexistence, were emptied of minorities as Turkmen, Christians, Shabak and Yazidis all fled for their lives.

Displaced people from the minority Yazidi sect, fleeing violence from forces loyal to the Islamic State in Sinjar town, walk towards the Syrian border on the outskirts of Sinjar mountain near the Syrian border town of Elierbeh of Al-Hasakah Governorate in this August 11, 2014. Photo credit: Rodi Said/File Photo/Reuters

As it expanded, however, Isis began to overreach. Its push into the Kurdish town of Kobane on the Syrian-Turkish border in late 2014 was one such moment. More a show of strength than a strategy, Isis sent thousands of its men to control the area. The US, in return, sent jets. “I was one of the people preparing our guys for battle, and sending them,” said a former Isis member now living outside Syria. “Every time I’d send people they’d be killed. Once I sent 30 Tunisians and they were all killed before they even got there. That was the time that people started to think twice.”

Isis lost more than 1,500 men in Kobane for no apparent gain. “Kobane was the first real battle in which American air power was deployed to support a group, in this case the Kurds, on the ground,” said Shiraz Maher, the director of the International Centre for the Study of Radicalisation at King’s College London. “I think the number of people Isis threw into the campaign therefore reflected their desire to show the Americans they were prepared to fight hard. Ultimately, of course, the campaign was a very wasteful one.”

Throughout the rest of 2015, and into the following year, the organisation appeared to hold its ground. Turkey gradually sealed its borders, stemming the flow of foreigners, but the already large numbers of fighters on the ground posed a formidable problem. Worst fears were not far off being realised. Chilling executions were soon being showcased on cutting edge cameras, their production values and widespread distribution designed for maximum impact.

High-definition horror became a prime component of Isis propaganda, all filmed and disseminated by foreigners, including a group of four Britons who sadistically tortured their captives and beheaded some on camera. In late 2015, suicide bombers attacked Paris. More hit Brussels airport. The UK was not spared, with-Isis inspired attacks at a pop concert in Manchester and at Westminster and Borough Market in London. In their wake came intensified efforts to chase the extremists from the land they had seized but, as soon became clear, were unable to control.

“The caliphate as a go-to destination started to drop away from 2016 when the campaign to retake Isis territory intensified and the group began being pushed back in places like Mosul,” said Maher. “The group’s senior leadership told people to no longer travel to join them, but to instead conduct attacks at home. That change in emphasis was quite significant. After that, the group’s loss of territorial control accelerated and its appeal was further diminished.”

In late 2016, Kurdish and Iraqi forces started an offensive on Mosul that succeeded, at great cost to the city and its residents, in pushing the extremists out of the city and into western Iraq. Another year of town-to-town fighting pushed it largely across the border towards Raqqa, the second and last of its centres of gravity. The Raqqa offensive started in mid-2017 and ended six grinding months later, with the city ravaged and the remnants of Isis allowed to flee in a deal struck with Kurdish forces.

From there, Isis members and their families gradually withdrew through eastern Syria, pursued by the Kurds to their final redoubt, which finally fell this week after a month of fighting. At least 15,000 jihadists and their relatives joined a caravan pushed into never-ending retreat, among them children born inside the “caliphate”. Local women had sons and daughters with men from all around the world. Foreign women had also given birth to children fathered by Isis members. Inside the refugee camp, the US jihadist Hoda Muthana was carrying an 18-month-old son fathered by her second husband, a Tunisian fighter. British citizen Shamima Begum gave birth to her third child in February. It later died. Stateless, isolated and with few protections, children, along with many hundreds more in the camp, are among the most vulnerable people on the planet.

Those who made it out of Baghuz were the lucky ones. Many hundreds more remained in an elaborate tunnel network dug below the town, the Isis equivalent of a doomsday bunker. Among the organisation’s rearguard were its most zealous devotees, those who refused to surrender even as death closed in. British families were among them, as were other foreigners, who mingled with Iraqis, Syrians, Russians and Tunisians, all of whom had stayed the course as Baghdadi’s vision of utopia crumbled around them.

The two children of Bashirul Shikder, an US citizen from Florida, were among the last group in the rubble of Baghuz, held by British jihadists who refused to leave. Burned by an airstrike that killed their mother in January, waiting to learn of their fate became an agonising ordeal for their father, who flew to northern Iraq in the hope of being reunited with the children taken from him four years ago by a wife who left him to join the “caliphate”.

As bombs rained down on Baghuz, a German woman, Laura Hensel, having surrendered to the Kurds weeks before, implored the women holding the children to hand them over to the Kurds. Her pleas appeared to go unanswered as the final assault on the last bastion of Isis pressed on. Those who had stayed this long appeared unwilling to leave now.

Fears of a new insurgency

Once a juggernaut that posed an existential menace to Iraq and Syria and aimed to conquer three continents, the so-called Islamic State lies in ruins, its foreign legions decimated, many in its homegrown ranks dead or imprisoned and its remaining leaders again on the run. The precipitous fall has led the group to rebrand its raison d’etre. Central to that is claiming that the losses are a result of an ongoing global war on Islam.

“Isis has explained away the loss of its caliphate in two ways,” said Maher. “The first is by pointing to divine providence and saying that it is the will of God. Either God is punishing or testing the caliphate by afflicting it with trials, but either way, they tell their supporters, the only suitable response is to double down in your devotion because that’s what God would want.”

Some holdouts who surrendered during the dying days of Baghuz had bought the new message. “The Islamic state will rise again,” screamed two women, their faces covered in niqabs, as they were driven to detention centres by their Kurdish captors.

Baghdadi, meanwhile, appears to have slipped the vast net of the search for him that ran throughout the heights of Isis territorial power and into its dying days. Those close to him say that he always harboured fears that his most devout advocates would one day turn on him. Officials who have hunted Baghdadi for the past five years say he had become obsessive about the dangers of digital technology, and for good reason. The drones circling above were looking for technical traces that could pinpoint their quarry. No one who met the fugitive leader was allowed to carry a phone anywhere near him.

The best guess of officials on both sides of the border is that he has slipped back into the familiar terrain of western Iraq, where the rumblings of a fresh insurgency are beginning to trouble leaders in Baghdad and Syria. The spectre of a guerrilla war, this time on both sides of the river, looms large in their fears.

Masrour Barzani, the chancellor of the Kurdistan region security council, said: “Taking away territory from Isis was central to the war. While the cost has been high, and the aftermath palpable in areas across Iraq and Syria, the underlying political and economic conditions remain just as unresolved. Unless regional governments address those grievances, Isis will remain one of many symptoms bound to re-emerge in a new form.

“Isis is about ideology, not fighters or territory. The group has already adapted to territorial defeat by returning to insurgency in areas with pre-existing sectarian fault-lines. It has gained renewed momentum in recent months across Iraq’s northern provinces using tactics it was always more comfortable with than holding territory. In areas freed from their terror, local sleeper cells have already reappeared to spread panic and fear.”

Fighters of the Syrian Democratic Forces flash the victory gesture next to their unfurled flag atop a roof at a position in the village of Baghouz in Syria's eastern Deir Ezzor province near the Iraqi border on March 24, 2019, a day after the Islamic State (IS) group's "caliphate" was declared defeated by the US-backed Kurdish-led SDF. Photo credit: Giuseppe Cacace/AFP

This article first appeared on The Guardian.