Sheppard's team are traveling through space in a Puddle Jumper when the proximity alarm goes off and find two pods small enough to hold a human body…and McKay picks up life signs. They take the pods back to Atlantis while Caldwell tries to make amends for his possession by a Goa'uld. Weir accepts his apology and offers one of her own, and takes him to see the pods. Beckett and McKay prepare to open the first pod, which contains an elderly woman. Beckett determines she's dying and when Weir approaches her, a beam of light shoots into her face and she collapses.
Weir wakes up but it's quickly clear it's not "Weir." She identifies herself as Phoebus and identifies herself as part of a race of explorers. Her vessel was attacked by the Wraith and she launched a lifepod. Phoebus lets Weir speak freely and she knows what Phoebus knows, and reveals that Phoebus wants the other lifepod brought to Atlantis as her husband Thalan is in it. Weir also mentions that Phoebus would like a favor from Sheppard.
McKay determines that the lifepod was programmed to beam Phoebus' consciousness into the first person to approach the opened pod, but the effects are temporary and serve to briefly transmit a pilot's memories of what happened – a "black box" as it were. They open Thalan's pod and Sheppard reluctantly moves forward to initiate the transfer. Thalan and Phoebus clearly recognize each other and they kiss, and then ask for a few minutes alone. Caldwell refuses but then the two move to take out the armed guards, grab the weapons, and open fire on each other. Phoebus reveals Thalan isn't her husband – he's the enemy. She has McKay radio security to report everything is fine before stunning him as well and as Weir orders the base to secure the facility and let her handle Sheppard.
Phoebus/Weir meets with Major Lorne and takes his team along, while Teyla and Ronon rendezvous with Caldwell when he wakes up. Caldwell orders security to secure Phoebus and Thalan, and Teyla and Ronon go after them. Lorne figures something is up and they try to take Phoebus/Weir into custody, but she knocks them out and locks them in. Caldwell takes command over McKay's reluctance at the fact he was previous a Goa'uld host. The two fighter pilots taunt each other over their radios as Caldwell and the others listen in. McKay locates one of them near the power room…just as the power cuts out.
Teyla and Ronon split up and Thalan/Sheppard pretends to be Sheppard to get close to Ronon, claiming Caldwell is possessed. Ronon (eventually) falls for it and starts helping him. They track down Phoebus/Weir who shoots Ronon, and Thalan/Sheppard abandons him after calling a med team.
Beckett finds Ronon and begins to operate by flashlight, while Teyla closes in on Phoebus/Weir. Phoebus/Weir stuns Teyla and then Thalan/Weir catches up and starts firing, while McKay works to restore the power. Just after he succeeds, Phoebus/Weir manages to engage the security system and close the blast doors. She contacts Caldwell and demands Thalan/Sheppard or she'll betray them to the Wraith like he did. They contact Teyla who is in the same sector as the two warriors and she manages to knock out Thalan/Sheppard.
Phoebus/Weir warns she'll use the halon fire suppressant system to kill the Atlantis residents unless they turn Thalan/Sheppard over to her. Teyla drags him over to a security camera and waits for Thalan/Sheppard to wake up. He wakes up and claims to be Sheppard, but Teyla doesn't buy it. While Rodney works against time to stop her, Phoebus/Weir orders Teyla to kill her enemy or she'll release the gas. Thalan/Sheppard appeals to Teyla but she draws her gun and asks for John's forgiveness…just as McKay overrides the code. Teyla drops her gun in relief while Phoebus/Weir tries to get control back without success.
No one has control of the systems and Caldwell sends his teams to get the two fighters. The tied-up Thalan/Sheppard asks to be released and then goes into convulsions – Caldwell orders her not to release him but Teyla looks on as Sheppard wakes up claiming to be himself but acknowledges she won't trust him. Phoebus/Weir arrives and Teyla says Sheppard is unconscious, and then slips him her gun. It's really Sheppard, and he stuns Phoebus/Weir.
Weir wakes up as herself in the sickbay with Sheppard in the next bed – the imprints have worn off. Caldwell shows up to sympathize with their possession experience and everything has worked out fine.