The Wraith ships arrive at the Athosian village and begin teleporting up the locals – the SG weapons prove useless and mysterious ghost-like figures seem to attack them, but Teyla warns they are illusions projected by the Wraith. They manage to bring one ship down before Sumner and Teyla are both grabbed. The two remaining Wraith ships activate the Gate by remote control and depart, but not before Lt. Ford memorizes the dial code.
Back at the Atlantis base, the power continues to wane and catastrophic failure is imminent. Weir is preparing to order an evacuation when the remainder of the team returns with the surviving natives. Before they can depart the city automatically rises above the water, giving them time to find Sumner and the others, and locate a power source.
Weir is reluctant to send someone to find Sumner without a remote chance of success, over Sheppard's objections. Meanwhile Teyla, Sumner and the others are confronted by the Wraith, who take away one of the villagers. They track the coordinates and find a Stargate floating in orbit around a planet. McKay and Sheppard prepare one of the Atlantis spaceships dubbed Puddle Jumpers by Sheppard, equipped with cloaking technology, and Sheppard and Ford fly the ship through the Stargate to the coordinates and start searching for the Wraith.
The Wraith return and take Sumner while Ford and Sheppard find their base and land nearby, preparing an assault. Sumner is taken into a great hall and brought before a skeleton, where he is confronted by a female Wraith, the Keeper. Sheppard and Ford find the other prisoners and Sheppard goes to find Sumner, who is being telepathically scanned by the Keeper. He tries to resist giving her information about Earth, that she wants so they can find new feeding grounds. She drains his life force, aging him, but he refuses to give her further information. Sheppard shoots the Keeper through the hand, breaking the connection and killing Sumner to spare him the agony. Sheppard is knocked out and taken prisoner.
Teyla asks Ford to go after Sheppard, which proves fortunate when he arrives in time to free Sheppard before the Keeper can interrogate and kill him as she did Sumner. Sheppard kills the Wraith with a Wraith weapon, but in the process awakens the base-hive and the thousands of sleeping Wraiths. Evading the teleport-capture beams, they get to the ship and head for the orbital Stargate. Using the Jumper's telepathic connection, Sheppard manages to draw off the Wraith ships and then get back to the Gate, sending his ID code ahead. They go rocketing into the Atlantis base (but are stopped by a the autopilot) and reactivate the iris force field just in time to destroy the pursuing ships. The team celebrate as the Athosians make themselves at home in the base, while Sheppard takes command as the ranking military officer. Teyla offers her people's knowledge of their Stargate addresses as a token of friendship and gratitude.