The Mosul dam, in northern Iraq, holds back more than 11bn cubic metres of water from the river Tigris. Completed by Saddam Hussein in 1986, and having been built on soluble gypsum, it was never the most stable of structures, requiring continuous grouting to maintain its integrity. But when Islamic State captured the dam in 2014, they ran off with all the grouting equipment. And even though the Kurdish peshmerga retook the dam some six weeks later, it is still close to the Isis front line, and the Kurds have been busy fighting, not grouting.

Last week the US embassy in Baghdad issued a warning that the risk of the dam failing is now “serious and unprecedented”. And if the dam was to burst, a 14 metre-high wall of water would be unleashed downstream that could drown over a million people and displace several million more. “The dam is in a very dangerous situation now,” said Dr Nasrat Adamo, the dam’s former chief engineer. “The coming floods in March and April will definitely raise the water to alarming levels. My feeling is the dam will fail sometime in the future.”

Mosul dam engineers warn it could fail at any time, killing 1m people Read more

As I read about this story, thousands of tiny connections started pinging off in my head. For it was on the outskirts of the city of Mosul, just a few miles from where the dam now creaks under the pressure of water, that in 1844 the young English explorer Austen Henry Layard first discovered the ruins of the lost city of Nineveh and its magnificent library of clay tablets. Back then, no one could read their curious markings and they were shipped back to the British Museum for scholars to study.

Decades later, in 1872, working on a mid-7th-century-BC tablet in the museum’s storerooms, the amateur enthusiast George Smith made an astonishing discovery. He began to read a story that sounded remarkably like another story many knew from Sunday school. The god Ea warned Utnapishtim about a coming flood. He was to build a large boat, to specific instructions. He was to fill the boat with “all the beasts and animals of the field”. The flood lasted six days and nights, after which the boat came to rest on the top of a mountain. Utnapishtim then sent out a dove, a swallow and a raven to seek out dry land. In the bowels of the museum, Smith suddenly realised he had before him an earlier version of the Noah’s ark story from the book of Genesis.

Human civilisation first flourished between the fertile banks of the Tigris and Euphrates rivers. This is where the first cities were founded. This is where writing itself began. And this is where, over a thousand years before the Hebrew Bible was put together, the first great story known to humankind – the Epic of Gilgamesh – was being scratched into clay. And it’s unsurprising that the flood story began here, between two great flooding rivers.

These days, the scholarly consensus is that, as Professor Walter Brueggemann has put it, “the Old Testament in its final form is a product of and a response to the Babylonian exile” – that is, to the period following 597BC when many Jews were carted off to captivity in Babylon, then the largest city in the world (and now squashed by a US military base, Camp Alpha). “By the rivers of Babylon, we sat down and wept,” wrote the psalmist.

In Babylon, Jewish exiles asked themselves how this catastrophe could have happened. There they whispered nostalgically of home and drew upon a great many Mesopotamian legends in the process. In the land of enormous ziggurats, they told about the Tower of Babel. In the land of cities, they imagined Abraham as coming from Ur, another of Iraq’s once great urban centres then located on the river Euphrates. It was in Iraq that much of the biblical imagination began to take shape.

Within four hours of the dam bursting, the people of Mosul would be underwater. Within 77 hours, Baghdad would be swamped. You don’t have to be interested in the Bible to recognise this as a potential disaster of biblical proportions.

@giles_fraser

• This article was amended on 11 March 2016. An earlier version said the Mosul dam holds back more than 12m cubic metres of water.