KOM OMBO, Egypt — Since Howard Carter discovered Tutankhamen’s tomb in the Valley of the Kings nearly a century ago, pop culture and folklore have invoked the fabled curse of the mummy, said to plague those who unearth the hidden treasures of ancient Egypt with bad luck, disease or death.

But at the ancient temple of Kom Ombo, 400 miles south of Cairo, where archaeologists recently unearthed a stack of decaying mummies, peril takes a more prosaic form: waterlogged foundations.

Decades of flood irrigation in the surrounding fields, which were once desert, have soaked the soil beneath the temple. Water has penetrated the sandstone foundations, combining with salt and heat to scrub some hieroglyphs from the temple walls. The symbols and figures, effectively the lines of an ancient story, are fading to dust.

The solution, according to engineers on a $9 million American-financed project, is some modern drainage. Since October 2017, dozens of laborers have been digging a 30-foot-deep trench around the temple walls in an effort to drain the groundwater and divert it back into the Nile.