A woman, Neeva Casol, is standing in a hallway in Atlantis and isn't aware of where she is. She enters an auxiliary laboratory and Dr. Zelenka seems to recognize her. He offers to call McKay and suggests she come with him to the infirmary. She picks up a knife and stabs Zelenka, then looks in the mirror… and sees Dr. Keller's face.
Neeva walks through Atlantis and goes out on a balcony, and tosses the knife away. McKay finds her and asks why she didn't meet him for their lunch date. He wonders if he's done something wrong, but they're interrupted when get a medical emergency call that Zelenka has been stabbed. McKay gets Neeva to the infirmary where they determine he needs immediate surgery from Keller. Neeva hesitates momentarily and then goes to get ready. She comes to the operating room as McKay watches from the gallery. She feigns illness and goes to lie down, leaving the other technicians to finish the operation.
Sheppard and McKay report to Woolsey that Zelenka has pulled through but is in a coma. McKay notes that she's been acting strangely all day and Woolsey says he'll have Beckett examine her when he gets back. He orders a full investigation into Zelenka's stabbing.
Neeva goes through Keller's belongings and finds her graduation photo. Ronon comes in and asks what's wrong with her. Neeva tries to bluff her way through but Ronon notices something odd. McKay comes in and informs her that Beckett is returning, but also soon realizes something odd is going on.
When Beckett arrives, he conducts a full scan but doesn't notice anything unusual. Neeva claims she's had trouble sleeping and he offers to give her a sedative, and then tells Woolsey that if there's anything wrong it's psychological. That night, Neeva dresses and then gets directions to the Jumper bay. She gets into a Jumper and takes a gun from an equipment case, then tries to work the controls. McKay arrives and asks her what she's doing, and she tries to distract him by seducing him and suggests they go to the mainland. When she persists, he insists on taking her back to the infirmary. She draws a gun but before she can pull the trigger, Ronon arrives and stuns her.
The team watches her in the infirmary and speculates as to what may have happened. Beckett suspects a psychological event but McKay wonders if she attacked Zelenka. Ronon is sure that Neeva isn't Keller and Sheppard proposes they interrogate her. They go in and demand answers, and quickly realize she stabbed Zelenka. She claims self-defense to keep him from turning her in, and identifies herself. She says she was examining artifacts in a village and then found herself in Keller's body. She says she and her "associates" travel from planet to planet "collecting artifacts. They heard about a village with treasures and broke into its vault. They found a device and Neeva discovered several stones. She inserted one into the machine, it activated, and she found herself in Keller's body.
McKay does some research and identifies the device as an Ancients communication device that SG-1 found several years ago. He remembers how Keller visited him in his lab when he was working on Ancient technology. He concludes she touched a couple of the communication stones and they connected to her. The case file indicates there's a lot of unanswered questions and breaking the link is problematic. They figure Keller is in Neeva's body, and wonder where it is.
Keller is sitting in a cell waiting for the locals to contact Atlantis. The local magistrate informs her that he checked Neeva's activities on nearby planets and she's murdered a number of people. They're still looking for her accomplices. Keller tries to explain who she is but the Magistrate doesn't believe her. He pronounces sentence of death on her for her crimes against the Coalition.
The team concludes they'll have to find the planet and shut down the device, and Beckett warns the device establishes a physiological connection: if Keller is killed, Neeva will be stuck in Keller's body. Neeva agree to help them in long as they give her a Puddle Jumper and agree not to pursue her. They bargain and she settles for safe passage. They go to the planet via Stargate and have to walk several hours to the village. Meanwhile, the Magistrate and his men take Keller out of her cell.
Sheppard's team arrives at the village and he suggests they talk to the villagers. Neeva wants to make sure she knows where her body is and insists on going. Ronon takes charge of her and they go to see the village leaders. They ask about the device and the second-in-command says it's hidden, and she doesn't have the authority to let them see it. She tells them the Magistrate has the authority and will return after the execution. Sheppard and the others realize what is going on.
Keller is taken through the woods to the place of the execution and tries to explain who she is without success. The executioner prepares to decapitate her, but Neeva's associates Jannick and Bordal open fire and Keller runs into the woods. They track her down and untie her, then take her away. Sheppard's team arrives and watches from hiding as the Magistrate orders a search of the forest and a guard on the Stargate.
Neeva explains about her accomplices and admits she has no idea where they've gone. Ronon starts tracking them while Jannick and Bordal take Keller to a cave. They notice she's confused and want to know what the plan is. She tries to bluff her way through and they seem convinced for the moment.
Neeva makes a break for it and Ronon loses her in the woods. Meanwhile, Keller tries to come up with a plan without much luck but balks when Neeva's accomplices suggest they kill the guards. Neeva arrives and they demand to know who she is. Neeva explains what happened and establishes who she is by telling them things only Neeva would know. She says they need to shut off the device but they don't believe her and insist on escaping through the Stargate.
They make their way through the woods and the villagers open fire. Bordal goes down and Keller makes a run for it. Neeva tries to stop Jannick from shooting her body and the villagers shoot her. Jannick runs after Keller, while Neeva tries to crawl away and Ronon stuns the villager while Beckett tries to stabilize Keller's body. They take her back to the Magistrate's building and demand that he show them the communications terminal. He agrees to help them and McKay tries to shut down the device while Beckett removes the bullet.
Jannick catches up to Keller and prepares to shoot her. In the village, McKay can't shut down the device and Sheppard suggests they blow it up. McKay isn't sure if that'll do it, noting SG-1 tossed their device into the vortex of a Stargate wormhole. They prepare to take it back to the Stargate, but Ronon blasts it and Keller wakes up in her own injured body. Neeva finds herself in her own body and tries to explain, but he doesn't believe her and prepares to pull the trigger.
Later on Atlantis, McKay goes to visit Keller in the infirmary, Woolsey lets him know that they haven't found Neeva and they've alerted the Coalition to keep an eye out for her. McKay comes in and Zelenka is less than thrilled. He assures Keller not to worry about it but McKay is less than impressed: he only got stabbed. Beckett wheels Zelenka out and McKay suggests they have a picnic under the stars. She wonders if he's undergone a personality change but admits it's a great idea.