On M5V-801, a group of villagers once employed as mining labor by the Genii are now endangered by steadily worsening earthquakes and terrible air quality. Wary of being exploited again, however, they're reluctant to let the team from Atlantis move them to a safer location. Samantha Carter joins Rodney McKay and Jennifer Keller to negotiate with them in person.
As the trio hikes to the village through deserted fields, however, a cave-in suddenly drops them belowground, into an abandoned Genii workroom. They're unhurt, but the hole in the ceiling is far too high for them to reach.
Worse, when they open a door in the workroom's wall, they discover that the structure they're in is perched on the edge of a vast underground chasm. The workroom was already unstable due to the frequent earthquakes. Now, with the added weight of the team and the dirt from the cave-in, it might slide into the depths at any moment.
Carter and McKay brainstorm ideas to escape. Plans involving a carefully engineered tower of crates and a jury-rigged grappling hook both end in failure. McKay (being McKay) also accidentally ruptures a gas line and ignites a firestorm that Carter must risk her life to quell.
As the team continues to work and small tremors periodically shake the chamber, they chat to keep their minds off the danger they're in. Carter and Keller end up advising McKay about his break-up with Katie Brown. Eventually, inspired by a bar trick that Keller knows, they build an ingenious bridge out of planks suspended on pipes halfway up to the roof of the chamber. Carter nearly climbs out, but then the structure collapses, sending her plummeting to the floor. Her leg is badly broken.
As a last resort, McKay designs a homemade cannon, with which he and Keller launch a metal rod out of the hole, hoping it can serve as an anchor for the climbing rope. As he and Keller pull the rope taut, more dirt cascades into the room. Between the earthquakes and this added weight, the supports beneath the chamber reach their limit. They buckle.
The chamber lists horribly to one side, the door to the abyss swings open, and Keller loses her footing and slides through. Luckily, she's still holding one end of the rope, and McKay has a grip on the other. Keller's life is literally in his hands as she dangles over the chasm's edge - but other than holding on tight, McKay has no idea how to save the day.