He stood for centuries at the very edge of ancient Egypt, gazing down imperiously upon the trading ships as they blew in from the Mediterranean. His name was Hapy: god of fertility, lord of the river, life-giving steward of its floods. And, on his plinth at the western mouth of the Nile, a massive red granite gatekeeper to one of the greatest port cities on earth.

Until one day, probably towards the end of the second century BC, there was a tremor and the ground began to churn and liquefy at Hapy’s feet. He wobbled, lurched, and then six tonnes of intricately carved stonework crashed into the sea.

In time, the rest of the settlement that Hapy guarded followed suit. A place written into the legends of antiquity – the site of the divine hero Heracles’ first footsteps in Africa, and where Sparta’s Helen famously sought refuge with her abductor, Paris of Troy – disappeared completely under water and was buried, seemingly forever, by layer upon layer of sand and silt.

In the early 2000s, however, a group of divers working off the Egyptian coast found a large fragment of rock under the seabed, and brought it up to land. It was a piece of Hapy, salt-encrusted but intact. They continued searching, and eventually unearthed six more. Around these pieces lay other treasures: the ruins of temples, shards of pottery, precious jewellery, coins, oil lamps, processional barges and busts.

“As an archaeologist, discovering a tomb is exciting, but it’s the tomb of one individual,” says Aurélia Masson-Berghoff, curator of the Sunken Cities exhibition at the British Museum. “Discovering a whole city, which was home to thousands and thousands of people over more than a thousand years … Well, that’s something else.”

The home in question was Thonis-Heracleion. And now, more than a millennium after it was first submerged, Hapy’s city is returning to the surface once again.

‘Part marshland, part urban sprawl’

Unlike Babylon, Pompeii or mystical Atlantis, few people today have heard of Thonis-Heracleion. Indeed, until the remarkable finds of recent years, there was a danger that the waves of the Mediterranean would consign to history not only the city’s physical remnants, but even its memory as well.

And yet if you were a European merchant in the fifth century BC – an importer of grain, perfume or papyrus perhaps, or an exporter of silver, copper, wine or oil – then Thonis-Heracleion loomed large on your horizon. The same was true if you were a Carian mercenary, an educated Greek, a professional sailor, or a member of the Pharaonic court. Scattered across a series of interlinked islands, sand and mudbanks, Thonis-Heracleion – part aquatic marshland, part urban sprawl – was ancient Egypt’s bustling, cosmopolitan gateway to the Mediterranean, and thus its nexus with the western world.

The British Museum exhibition opens with the reassembled Hapy. Photograph: Stefan Rousseau/PA

Founded around 2,700 years ago on the site of present-day Abu Qir bay, 15 miles north-east of Alexandria, Thonis-Heracleion predated its better-known neighbour as the main emporion (trading port) for the region by several centuries and was a hub for international commerce.

Criss-crossed by a network of canals and dotted with harbours, wharves, temples and tower-houses – all joined together by a network of ferries, bridges, and pontoons – the city controlled most of the maritime traffic coming into Egypt from the Mediterranean. Goods would be inspected and taxed at the customs administration centre, and then carried on for distribution further inland, either at Naukratis – another trading port that lay almost 50 miles further up the Nile – or via the Western Lake, which was connected by a water channel to the nearby town of Canopus and offered access to many other parts of the country.

Although Thonis-Heracleion and Canopus are mentioned by many of the great chroniclers of antiquity, from Herodotus to Strabo and Diodorus, most detailed knowledge of their existence was feared to have been permanently lost.

Before 1933, when an RAF commander flying over Abu Qir glimpsed ruins in the water, most historians believed Thonis and Heracleion to have been two separate conurbations, both of which were situated on the current Egyptian mainland. The pilot’s sighting, however, kicked off a whole new era of offshore research. By the turn of the century a team from the European Institute for Underwater Archaeology – originally attracted to the bay by the presence of French warships that sunk in the late 18th century – had created a series of maps sketching out the ancient topography of the region.

These charts – and the painstaking work of underwater excavation that has followed – relied upon hi-tech survey techniques and tireless human effort. The waters here are murky and visibility is low; in the aftermath of storms, “the sea is all stirred up, and charged with floating sand and mud that makes it difficult for us divers to see what is going on,” explained one researcher.

Archaeologists had to begin with side-scan sonar, directing pulses of sound energy at the seabed and then analysing the echo to establish the changing depth of the ocean floor. A nuclear magnetic resonancemagnetometer, which can detect localised anomalies in the earth’s magnetic fields, was then used to identify geological faultlines caused by the weight of long-submerged buildings pressing down upon and fracturing layers of sediment, and to pinpoint the presence of large objects.

With the most promising excavation spots now fixed, scuba divers were sent in. They carried water-dredges: huge underwater vacuum-cleaners that hoover away overlying blankets of sand and expose the archaeological layers beneath. The biggest items, such as building fragments and colossal statues – a Ptolemaic king and queen, each five metres high, among them – were the easiest to find and resurrect from the seabed, but smaller and more eclectic gems soon followed, including goblets, figurines, ritual pails, and 13 limestone animal sarcophagi.

One by one, each artefact was catalogued, photographed, and then – if safe to do so – winched up to the deck of the Princess Duda research boat before being subjected to further analysis back on land. Together, they have transformed our understanding not just of Thonis-Heracleion, but of the nature of Egypt and its interactions with the Hellenic world at the time. “Some of these objects are completely unique, of great historical or artistic importance,” Masson-Berghoff told the Guardian. “They push us to think anew.”

The Decree of Sais, for example – a magnificent black stele that stands two metres high and is carved with perfectly preserved hieroglyphics from the early fourth century BC – was unearthed on the site of a temple to supreme god of the Egyptians, Amun-Gereb, at Thonis-Heracleion. The stele reveals some of the intricacies of contemporary taxation in Egypt: “His Majesty [Pharaoh Nectanebo I] decreed: Let there be given one-tenth of the gold, of the silver, of the timber, of the processed wood and of all things coming from the sea of the Hau-Nebut [the Mediterranean] … to become divine offerings to my mother Neith,” reads its edict.

But the stele has done more than flesh out our understanding of ancient Egyptian tariffs. Its discovery has also helped solve a long-running mystery: by comparing it to other inscribed monuments, experts were able to determine that Thonis and Heracleion were not, as previously believed, two different towns, but rather one single city known by both its Egyptian and Greek name respectively.

The interplay between Pharaonic and Greek societies in Thonis-Heracleion is a constant feature of the city’s remnants: Hellenic helmets were nestled in the seabed alongside their Egyptian counterparts, as were Cypriot statuettes and incense burners, Athenian perfume bottles, and ancient anchors from Greek ships.

This stele reveals that Thonis (Egyptian) and Heracleion (Greek) were the same city. Photograph: Christoph Gerigk/Franck Goddio/Hilti Foundation

Nowhere was this cross-cultural pollination more evident than in the realm of religion, particularly during the rise of the Ptolemaic dynasty in Egypt, where a succession of foreign-born rulers sought to justify their power in the eyes of the Egyptian people by demonstrating their affinity with Pharaonic traditions.

One object recovered from the water is a 2,000-year-old stone figurine of Cleopatra III: a Ptolemaic queen, but depicted as the Egyptian goddess Isis and sculpted in a style that combines both local and Hellenic aesthetics.

Drowned worlds: Egypt's lost cities

Read more

Among the most beguiling of Thonis-Heracleion’s remains are the artefacts associated with the city at play. The annual celebration of the Mysteries of Osiris, marked all over ancient Egypt, involved the preparation – in the secrecy of the temples – of two figures of Osiris, god of the underworld and resurrection: one made of soil and barley, the other of expensive materials including ground-up semi-precious stones.

In Thonis-Heracleion, the former was placed in a granite tank and nurtured with Nile water until it germinated. It was then placed in a papyrus barge alongside 33 other vessels; the whole flotilla was illuminated by 365 oil lamps – one for each day of the year – and eventually sailed down to the nearby settlement of Canopus. As well as an 11-metre sycamore vessel that would have been used in this procession, archaeologists have unearthed several small lead replicas of the papyrus boats, thrown into the water as votive offerings by onlookers.

These finds offer a rare glimpse into the practice of ancient ritual, rather than just the liturgical representation of it. In Masson-Berghoff’s words, they provide a connection to the “materiality” of religion in Thonis-Heracleion. That’s important because, while the items dredged up so far from the bottom of Abu Qir bay tell a remarkable story of a city that could have vanished completely from our consciousness, it is, for now at least, very much a selective story. Those working on it today are well aware of its holes.

“My hope is that future discoveries will enable us to shed more light on the lives of ordinary people,” says Masson-Berghoff, who points out that while we know more than ever about Thonis-Heracleion’s rulers and priests, it is much harder to picture the mudbrick homes and daily lives of those who served them and kept the busy port operating smoothly.

Today, 95% of the area’s urban footprint remains to be explored; perhaps there are objects yet to be found that can enrich our understanding of how cargo unloaders, cleaners and cloth-sewers experienced their city. “What we know now is just a fraction,” observes Franck Goddio, director of the ongoing excavations. “We are still at the very beginning of our search.”

By the second century BC, Thonis-Heracleion’s era of pomp and prestige was already fading. Further along the coast, the new metropolis of Alexandria was rapidly establishing itself as Egypt’s preeminent port, while the hybrid foundation of land and water upon which Thonis-Heracleion was built had begun to feel less secure. It wasn’t a single natural disaster – an earthquake, tsunami, rising sea levels, or subsidence – that doomed the city, but rather a combination of them all.

Lost cities #7: how Nasa technology uncovered the 'megacity' of Angkor

Read more

At the end of the century, probably after a severe flood, the central island – already sagging under the weight of the main temple buildings – succumbed to liquefaction. In what must have been a terrifying experience, the hard clay soil turned to liquid in moments and the buildings atop it collapsed swiftly into the water. The supply of pottery and coins into Thonis-Heracleion appears to have ended at this point; a few hardy residents clung on to their homes throughout the Roman period and even into the beginning of Arab rule, but the last vestiges of the city sunk below the sea at the end of the eighth century.

At a time of looming ecological catastrophe, it is perhaps unsurprising that we should find the tale of Thonis-Heracleion so fascinating. Its rediscovery is a testament to advanced technology and human ingenuity, but the city’s fate – and the eerily inanimate memories of a long-forgotten urban life left behind – are a reminder of how fragile many of our own contemporary cities are.

Venice, arguably Thonis-Heracleion’s closest modern cousin owing to its siting on a lagoon and its famed network of waterways, is sinking; Egypt’s Mediterranean coastline remains one of the places on earth most vulnerable to rising sea levels, and even the most optimistic projections of global temperature increases could still displace millions in the region from their homes.

Hapy’s reawakening from the seabed, a millennium in the making, is a unique window to our urban past. The struggle continues to ensure he and his city are not also a vision of our future.

The Egyptians: A Radical Story, by Jack Shenker, is published by Allen Lane (£15.99); buy it for £11.19 here. Sunken Cities, an exhibition of artefacts found at Thonis-Heracleion and Canopus, is at the British Museum until 27 November 2016

Please share your stories of other ‘lost cities’ throughout history in the comments below. Follow Guardian Cities on Twitter and Facebook to join in the discussion