When it comes to difficult travel, no journey outside New York City’s subway system rivals the ones described in “The Book of Two Ways,” a mystical road map to the ancient Egyptian afterlife.

This users’ guide, a precursor to the corpus of Egyptian funerary texts known as “The Book of the Dead,” depicted two zigzagging paths by which, scholars long ago concluded, the soul, having left the body of the departed, could navigate the spiritual obstacle course of the Underworld and reach Rostau — the realm of Osiris, the god of death, who was himself dead. If you were lucky enough to get the go-ahead from Osiris’ divine tribunal, you would become an immortal god.

“The ancient Egyptians were obsessed with life in all its forms,” Rita Lucarelli, an Egyptology curator at the University of California, Berkeley, said. “Death for them was a new life.”

The two journeys were a kind of purgatorial odyssey reminiscent of Dungeons & Dragons: extraordinarily arduous, and so fraught with peril that they necessitated mortuary guidebooks like “The Book of Two Ways” to accompany a person’s spirit and ensure its safe passage. (The “two ways” refer to the options a soul had for navigating the Underworld: one by land, the other by water.) Among other annoyances, the deceased had to contend with demons, scorching fire and armed doorkeepers, who protected the dead body of Osiris against gods bent on preventing his rebirth, according to Harco Willems, an Egyptologist at the University of Leuven in Belgium. Success in the afterlife required an aptitude for arcane theology, a command of potent resurrection spells and incantations and a knowledge of the names not just of Underworld doorkeepers but also of door bolts and floorboards.