Ever since human beings created the first submarines, there have been other, more claustrophobic people who have stared at the devices and thought: “Nope.” For many, the thought of the pipe- and equipment-filled narrow metal confines is enough to trigger a fear of drowning—even when they’re standing on dry land. But everyone who has ever looked at a sub, even those of us so enamored with the underwater beasts that we sleep in custom-sewn adult-sized submarine pajamas, has at some point wondered: If the boat goes down, is there any way out?

Yes! Escape plans and tools are almost as old as submarine technology itself. Although the odds may always be stacked in favor of the merciless, cold depths of the sea, a few dozen lucky people have taken that unintentional ride down to the ocean floor and lived to see daylight again. Their stories teach us how to get out.

Adapted from In the Waves: My Quest to Solve the Mystery of A\a Civil War Submarine, by Rachel Lance. Buy on Amazon. Courtesy of Dutton

In 1851, German submarine inventor Wilhelm Bauer looked at two of his panting countrymen, slumped inside the hull of his creation. The boxy, 26-foot-long, human-powered early sub model was supposed to help win the ongoing war with Denmark, Germany’s neighbor to the north, but the odds of its successful use were looking grim. The crew of three had been trapped inside the submarine for hours, sitting and waiting for rescue.

The test day in Germany’s Port of Kiel had started normally. The men had crawled, as usual, through the hatch in the angular conning tower above the bow and taken their places: Bauer at the controls, and Witt and Thomsen each standing at one of the two massive hamster wheels that powered the boat’s propeller. Bauer gave the command. Witt and Thomsen lifted their legs and began to step on the spokes of the wheels, spinning them slowly like a giant human-powered waterwheel. The submarine began to move forward.

Bauer expected a graceful and smooth disappearance beneath the surface of the water, like an elegant metal seal. Instead the Brandtaucher (“Fire Diver”) plummeted unexpectedly, caroming wildly in an awkward, unstoppable, and rapid descent into a depression in the harbor floor that was 16 meters deep. As she crashed into the seafloor and shuddered to a final stop, the three men were hurtled unceremoniously into the bow of the boat. They pieced themselves together, shaken but uninjured. However, Bauer, Witt, and Thomsen slowly came to the realization that they couldn’t get the boat out of the hole. They were stuck.

At first, they just waited. And waited. For at least five hours, according to them, they sat, wondering when rescue would come. Their dive had been witnessed by onlookers; they figured it was just a matter of time until the German Navy hauled them back up to safety and fresh air. Someone had in fact noticed, and eventually the clanking of chains and anchors on the hull indicated that boats and divers were poking around the wreck site. But Bauer was growing concerned about the air … and the anchors.