In the previous month, a few hundred ISIS fighters had seized Mosul, Iraq's second-largest city, in a matter of hours. They drove thousands of Iraqi troops from the city, in the process getting their hands on a huge arsenal of US-supplied weaponry Iraqi forces had left behind. They went on to conquer a string of towns and cities, reaching the outskirts of Baghdad.
Now, four and a half years later, that realm has all but disappeared, after Kurdish forces said Saturday that they captured the eastern Syrian pocket of Baghouz, the last populated area under ISIS rule.
Kurdish-led Syrian Democratic Forces have launched multiple operations since early February to bring the caliphate to an end. Night and day, artillery and mortar barrages and warplanes from the US-led foreign coalition pounded ISIS' final encampment: a sprawling junkyard of wrecked cars and tattered tents.
Tens of thousands of people have left ISIS' last stronghold since the barrage began, includingISIS jihadis who have surrendered.
In an ISIS video, people could be seen running for cover while others fired from the barricades. In its final week, the shell-cratered pocket held as many as 5,000 people and defied all predictions of a swift and final defeat.
The group still has some fighters in central Syria and has gone underground in Iraq, where it continues to stage surprise attacks.
ISIS as a territorial entity, a quasi-state, is history. The scars left by ISIS, and the long war against it, will take decades to heal.
In June 2015, I visited a school in Baghdad that had been turned into a temporary home for people who had experienced life in Mosul under ISIS and had fled the madness.
One of them, Louay Shawkat, was an Iraqi army veteran, now confined to a wheelchair.
He told me he had fought the Iranians in Iraq's eight-year war with that country, fought the Americans in 1991. ISIS, he said, is different.
"It's an illness," he said. "It's impossible to cure. Cancer can be cured. Tuberculosis can be cured. Almost every illness can be cured, but not this one."
Indeed, we've seen the cancer manifest. In the perverse, lurid video beheadings of American journalist James Foley and other journalists; in the burning, alive in a cage, of Jordanian air force pilot Moath al-Kasasbeh. The Jordanian's murder was shot from multiple angles, the entire production edited together by someone who was clearly a professional. Countless murders captured on camera in the most gruesome detail were spread across the globe by social media.
We saw it in the mass murder and enslavement of Yazidis in Iraq and Syria, where ISIS killed the old and infirm and the able-bodied men, and sold the women and children into slavery. ISIS didn't conceal, didn't deny and didn't cover up any of it.
While many of the regimes in the Middle East try to hide their barbarity, will go to great lengths to conceal their violations of human rights, will spend tens of millions of dollars on lobbying and public relations firms to conceal the true nature of their rule, ISIS boasted of its brutality, took pride in its savagery.
In 2015, I went to Baharka refugee camp outside Erbil, in northern Iraq. There I met Ibrahim, a Palestinian born in Haifa. He fled his home in 1948 at the age of 11, eventually ending up in Mosul, where he experienced life under ISIS first hand.
"The things we've seen were enough to drive you mad," he recounted, sitting cross-legged on a blanket in his family's tent.
"We ran away," his son, Tamer, interjected. "I didn't want my children to see any more horrible things. In Mosul, we'd drive down the street and see dogs eating dead bodies in the road."
Like the Yazidis, Christians who found themselves in the path of ISIS's onslaught knew that as non-Muslims their fate was bleak at best.
Father Gabriel Touma was born in the northern Iraqi Christian town of Al-Qosh and lived there all his life. When I met him in early 2015, he recalled that, just months before, ISIS forces were just six kilometers, less than four miles, from the town.
"I stood before the statue of the Virgin Mary and wept with a broken heart," he told me. "I prayed to her to protect us from evil."
He had seen what ISIS had done in nearby Mosul, where they toppled crosses off church roofs, vandalizing their contents, sequestered property owned by Christians and imposed taxes on those who refused to convert.
"It's like knife stabbing us in the heart, when we see our heritage, our history, the work of our forefathers, being destroyed before our eyes and we're helpless to do anything to stop it," he said. "It's a slow death."
But ISIS's reign of terror didn't spare those who might have seen it in a more positive light.
Abdel Razaq Hamadi, a Sunni tribal leader in Al-Dour, a town outside Tikrit, Iraq, recounted to me that when ISIS took control, they attacked his home, killing his wife, two sons and two grandsons.
He was under no illusion about the group, regardless of their claims to piety, and took up arms against ISIS.
"I know the people who killed my family," he said. "We want to fight these terrorists, drive them out of this area and never see them again."
Two years later, on the outskirts of Mosul at the height of the offensive to retake the city, I sat with Mariam, a women in her 70s, by the side of the road. She was resting after fleeing her home, chain-smoking the cigarettes ISIS had forbidden her to have.
She had no illusions.
"They took pills. They drank alcohol. They oppressed us," she spat out scornfully. "But when they came to you, they'd say 'God says this, Muhammad says that.'"
In the town of Al-Alam, near Tikrit, we were there when trucks piled high with mattresses, household possessions and people drove into the town, bringing home residents after ISIS had fled.
"Thank God we're home," said a woman, who identified herself only as Um Nour, the mother of Nour. "We've been freed from ISIS. May God curse them until judgment day!"
Indeed, today much of Syria and Iraq has been freed from ISIS, but its curse lives on. There, the group has morphed into a low-level insurgency, carrying out hit-and-run attacks and bombings.
And beyond, in Libya, Egypt's Sinai Peninsula, Nigeria, the Philippines, Afghanistan and elsewhere, groups that have pledged allegiance to ISIS still control territory. And ISIS continues to inspire so-called lone wolves to carry out attacks.
While some may be tempted to celebrate what is seen as ISIS's demise, the fertile soil in which ISIS grew and spread is still there.
Brutal regimes across the Middle East have emerged from the Arab Spring more adept than ever at repression. The prisons are full of the innocent and the guilty rounded up by police states adept in the art of torture and coercion. At the same time, a new wave of unrest, fueled by anger over the rising cost of living, is beginning to raise its head, spurred on by the inability of these very same states, teetering on the brink of failure due to incompetence, corruption, bankruptcy and brutality.
Unless all of that changes, ISIS or something perhaps even worse, like a demonic phoenix will rise again from the ashes of Abu Bakr al-Baghdadi's ruined realm.