Rodney and Zelenka are running diagnostics on the Stargate to determine why it isn't working. They get a report of an impact on the city and go to find out that it's some kind of probe they can't identify. They find damage on it that indicates weapon fire. When Lorne suggests they have Zelenka go back to gate diagnostics, Sheppard overrides him, insisting that the probe represents a possible danger. McKay and Zelenka continue to decrypt the probe results and Zelenka suggests they go back to the gate diagnostics. However, the system shuts down abruptly. However, Rodney sees enough to identify it as nanite code.
McKay reports to Sheppard about the nanite code, although Zelenka insists he didn't see anything. They're interrupted by an explosion from McKay's lab: the probe has self-destructed. Rodney meets privately with Sheppard and insists that something is going on.
Sheppard spars with Ronon later and expresses Rodney's suspicions. Ronon admits that he and Teyla doesn't think people have been acting like themselves. Ronon leaves Sheppard with a scratch and he goes to sickbay, where Dr. Keller says he doesn't have any injury, just blood. Sheppard tells her to run a scan on him, suspecting he might be infected by nanites. The test turns up negative but he tells her to run a blood test based on the retrovirus he once caught.
Later, Keller secretly meets with Lorne and they discuss the situation, but to decide to be careful.
Keller reports later to Sheppard and says there are no signs of the retrovirus. Sheppard isn't satisfied and she agrees to run the test again. Later, Ronon, Teyla, and Sheppard call Rodney in for a private meeting and then cut his hand. They watch him and determine that his wound healed. They've all tested the same way and Rodney figures that Zelenka crashed the system deliberately. Rodney accesses the infirmary computer remotely and finds no test results. Sheppard and Teyla go to the infirmary while Rodney is unable to clear up the lifesign sensors… until he clears the loop and discovers there are only their four lifesigns on the base. Elsewhere, Keller and Lorne realize something is wrong.
As Teyla prepares to scan Sheppard, Rodney spots another life sign and Ronon takes him to investigate. Teyla runs the scan and discovers Shepaprd infested with nanites. Rodney and Ronon go to the room with the life sign and find Dr. Elizabeth Weir, unconscious. They wake her up but Keller and security guards come in and say the room is where they made all of them. Lorne and his men confront Sheppard and Teyla and dare Sheppard to shoot them. When Sheppard does, Lorne heals automatically.
Keller reveals that since Rodney corrupted their code, they can now assume any living human form, and they are not on the real Atlantis. They were created from the inside out by the Replicators, and their memories taken from when they were probed a year ago, and updated from the captured Weir.
Everyone is put in the brig and Dr. Weir proves she's real by cutting herself and instantly healing. Rodney figures the gate isn't working because it isn't a real Stargate. The skies have been overcast for the last week, preventing them from seeing the stars and identifying their position.
Dr. Weir is taken to the Replicator Keller, who reveals the real Weir was killed several months ago, to prevent her human part from influencing the Replicators. Weir realizes the Replicators want to figure out a way to Ascend, and they are part of Niam's covert group. They want a soul and the other Replicators led by Oberoth have given up on the quest and are destroying human populations.
Weir is returned to the brig with the others, who determine they need to go back to the real Atlantis. Weir warns that Replicator Keller plans to wipe all their memories and start over, and the probe was sent by Oberoth and the main group of Replicator: the experiment has been compromised. Replicator Keller arrives and Weir warns that they'll figure it out no matter how many times their memories are wiped out. Weir suggests they start with compassion but Replicator Keller says the others have found them and are launching an attack. They don't have enough power after creating the "fake" Atlantis team to raise shields, so Weir and the others insist they be released so the work isn't wasted. Replicator Keller concedes and gives them the core system of a Replicator ship tracking system, then sends them to a Puddle Jumper. The fake Atlantis team escape under cloak just as the fake city is destroyed, and hitch a ride on the destroyer as it goes into hyperspace.
As the team await arrival on the Replicator home world, Weir wonders what will happen to them and suspects they won't receive a warm welcome at the real Atlantis. They arrive and discover the Replicators have rebuilt their ship yards.
On the real Atlantis, McKay is working on a streamlining program for the Gate when they get an incoming wormhole from a Major Jordan. Jordan puts them in contact with the Duplicate Weir and the others. She explains what happened and they set up a meeting of the two teams. The duplicates reveal they have the tracking system and the two McKays start working to hook it up. The duplicates are forced to reveal that the original Dr. Weir is dead and the real Sheppard talk with the duplicate Weir. The real Ronon isn't thrilled, while the duplicate doesn't want to go back. Sheppard tries to reassure the duplicate Weir, who thinks they'll consider her less then she really is.
They're interrupted when the Replicator destroyer arrives, having tracked the Puddle Jumper. It opens fire while another ship cuts them off from the Stargate. The duplicate Weir says they need a diversion and flies the Puddle Jumper past the Replicator destroyer, which gives chase and bring it down. They find Weir and the others aboard, all seemingly dead. However, they're the duplicates, which the Replicators destroy. The real Atlantis team gets back to base safe and sound.
Later, Rodney is working as hard as he can and Zelenka points out he's trying to avoid thinking about Weir. Rodney admits it's Carson all over again, and he isn't ready to deal with Weir's death yet. Sheppard finally admits that Weir is gone and orders her belongings shipped back to Earth. Rodney gets the tracking device on-line and discovers they have ships spread throughout the Pegasus Galaxy.