Baghdadis have long memories. Talk to them about the extraordinarily turbulent history of the Iraqi capital as they contemplate their city falling to Islamic State (IS) fighters, and one date tends to crop up: 1258. Although this was certainly not the last time barbarians were at the gates — think Tamerlane, Sword Arm of Islam, Conqueror of the World, who comprehensively sacked the city in 1401, leaving 120 towers containing 90,000 skulls of his victims as a battlefield memento — the unparalleled devastation of the 1258 invasion, with its far-reaching consequences for the wider Muslim world, remains a bitter wound to this day.

The whirlwind blew in from the east. Hulagu Khan, founder of the Ilkhanate empire that encompassed Iran, much of the Middle East and Central Asia in the thirteenth and fourteenth centuries, was the grandson of Genghis Khan, the Scourge of God. Riding west from Mongolia in 1253 on a self-appointed mission to rescue the oppressed Christian communities of the Middle East and Caucasus, he issued a warning to the Abbasid caliph Mustasim in Baghdad to surrender or face total ruin. Should the leader of the Muslim world refuse to acknowledge Hulagu’s sovereignty, the Mongol wrote:

I will bring you crashing down from the summit of the sky,

Like a lion I will throw you down to the lowest depths.

I will not leave a single person alive in your country,

I will turn your city, lands and empire into flames.

The caliph Mustasim was unimpressed. Writing back to Hulagu, he dismissed the wild ambition of a “young man”, advised the eastern invader to return home and prepared to resist.

History has not been kind to Mustasim. According to the historian John Saunders, he was a “weak, vain, incompetent and cowardly” leader. Others point to the caliph’s preference for the pleasures of his harem and hunting grounds over the hard-headed defence of his realm. He had neglected his army to the point where there were mass desertions and even defections to Mongol ranks. The parallels with Iraq’s former prime minister, Nouri al-Maliki, who has seen the national army dissolve at the approach of IS right across northern, western and central Iraq, are irresistible.

On Jan. 30, 1258, Hulagu’s forces, who had began investing Baghdad from the east, launched an assault on the city with the full Mongol arsenal of siege engines. It was a terrifying bombardment of rocks, palm trunks and flaming naphtha. Pontoon bridges were laid across the Tigris both above and below the city, manned by 10,000 Mongols with siege engines, sealing off all escape routes by river.

Within days Hulagu’s forces had captured the entire length of the eastern wall, the key to taking control of the city. Mustasim sent a deputation to Hulagu, stalling for time, but it was too late to surrender on favourable terms. Suleiman Shah, the commander-in-chief of the caliph’s army, was seized and taken to Hulagu’s camp, where he and 700 members of his household were killed.

On Feb. 10, Mustasim and his three sons, together with 3,000 of the city’s most distinguished figures, including sayids (descendants of the Prophet Mohammed), imams, and qadis (judges), entered Hulagu’s camp to offer a formal surrender. Mustasim gave the order to cease all resistance.

Promised mercy, Baghdad’s grandees trooped out of the city and handed themselves in to Mongol forces. They were hacked to death in cold blood, scholars, scientists, religious leaders “slaughtered like sheep”, according to Ibn Kathir, the fourteenth-century Syrian historian. Hulagu then gave his men licence to rape, kill and plunder with the caveat that Christians and Jews were to be spared. He had promised to turn Mustasim’s kingdom “into flames” and was as good as his word.

Baghdad was set alight. The great Abbasid palaces, envy of the world, were consumed in the blaze, together with mosques, law colleges, the tombs of the caliphs, markets, libraries, and street after street of homes. Baghdad, the most sophisticated civilization in the world, went up in smoke, leaving only a few simple houses standing. The chronicles said the Tigris ran red with blood.

The dead and dying lay piled in rising mounds across the city. Decomposing corpses led to a rampant plague so severe it spread to Syria. The stench forced Hulagu to move camp several miles away, where his generals had stashed the great treasures of Abbasid civilisation, proudly preserved for half a millennium.

What of the death count? In a letter to Louis IX of France, Hulagu claimed 200,000. Other medieval historians reported 800,000. One even suggested two million. Whatever the true figure, it was a massacre of twentieth-century proportions.

Mystery surrounds the final fate of Mustasm. According to the notoriously unreliable Venetian traveller Marco Polo, he was locked in a tower with nothing to eat but gold and “died like a dog”. More likely he was rolled in a carpet and trampled to death by horses to honour the Mongol tradition of not shedding royal blood. One of Hulagu’s final insults, after reappointing the Shia vizier suspected of treachery towards Mustasim, was to give the Christian patriarch of the Nestorian church one of the caliph’s palaces, together with a plot of land on which to build a church. The latest incarnation of that church still stands on Khulafa Street in downtown Baghdad.

For many Arabs and Muslims, the memories of 1258 remain a psychological sore. It is on a par with Alaric’s sacking of Rome in 410 or the fall of Byzantium in 1453, a date that still haunts Greeks almost 600 years later. In 2002, Osama bin Laden likened Chairman of the Joint Chiefs of Staff General Colin Powell and Vice President Dick Cheney to Hulagu for the damage they inflicted on Baghdad during Gulf War One. And when British General Sir Stanley Maude captured Baghdad from the Ottomans in 1917 — another humiliation for the Muslim world — he made specific reference to the trauma of 1258: “Since the days of Hulagu your city and your lands have been subject to the tyranny of strangers, your palaces have fallen into ruins, your gardens have sunk in desolation, and your forefathers and yourselves have groaned in bondage.”

Hulagu’s storm of destruction marked the end of Baghdad’s ascendancy and, more important, heralded longer lasting disunity and decline for the Islamic world as a whole. During its long and glorious Abbasid heyday, which stretched from 762 to the catastrophe of 1258, Baghdad was the intellectual and cultural capital of the planet. The Bait al Hikma, or House of Wisdom, founded by the caliph Mamun in the early ninth century, was a translation centre cum royal archive cum library cum think-tank, translating, refining and republishing the texts of classical Greek, Hindu and Persian scholarship. This was the seed of the golden age of Arab science. Contrast that with the sobering Arab Human Development Report of 2002 which found that in the 1,000 years since Mamun’s reign Arabs have translated as many books as Spain translates in a year.

With Arab culture, politics, economic clout and prestige in such disarray today, it is little wonder that Islamists talk about restoring the Islamic caliphate, a supposed pathway to glory. They want to undo the carnage of 1258, when Baghdad, the peerless Islamic capital of world civilisation, was transformed into an ignominious corner of a fledgling empire. It was the most shattering blow the Muslim world had ever received, one from which arguably it has never recovered.

Yet the chauvinistic outlook and limited education of the latest generation of Islamists helps explain why they completely fail to recognise the caliphate was an outward looking, cosmopolitan, economically powerful, multi-faith enterprise from the start, with Jews and Christians alike playing influential commercial, religious and political roles. Unlike the many scholars from the caliphate they purport to admire, IS doesn’t do free thinking or intellectual curiosity — let alone the long nights of wine, women and song so beloved by the caliphs of Baghdad. Don’t bother asking an IS militant what he thinks of free trade, foreign investment, gender empowerment, civil society and so on.

We should not lose track of the irony that if the Muslim forces of IS were to capture the quintessential Islamic city that is the Iraqi capital, although they are unlikely to unleash as devastating an apocalypse as did Hulagu, it would be a catastrophe for Baghdad, Iraq and much of the Muslim world they delusionally aspire to lead to greatness.