The Replicators are wiping out the human populations of planet after planet, to destroy the Wraith's food supply. In response, Atlantis's exploratory teams are visiting human-inhabited planets and attempting to persuade their denizens to evacuate. In addition, McKay and the captive Wraith in Atlantis collaborate to create an anti-Replicator weapon, but their progress is frustratingly slow.
While they struggle, both the Daedalus and the Apollo roam the galaxy, destroying Replicator ships one by one with new Asgard weapons. When all remaining Replicator ships retreat to their planet to prepare for a massive attack, however, the two Earth-built warships must also retreat to Atlantis, because they're no match for the entire Replicator armada at once.
McKay abruptly realizes that instead of designing a program to tear Replicators apart, he could design a program to fuse them all together until they collapse into a single dense object, similar to a neutron star. The plan is tricky for two reasons. The best way to deliver the necessary command into the Replicator network is for McKay to create his own Replicator that could infect the network with the virus. Also, the team will need an entire fleet of warships to contain the Replicator armada around their planet long enough for each Replicator ship to be sucked into the mass.
After several false starts, McKay builds a human form Replicator, whom he dubs Fran. Designed to be enthusiastic about her mission, Fran informs McKay that if the implosion doesn't happen quickly enough, the fused Replicators will regain self-control and become a gigantic super-Replicator. McKay resolves to beam into the Replicator city himself during the attack to program their Z.P.M.s to explode, accelerating the collapse.
As McKay works, the rest of Sheppard's team enlists 14 warships from the Wraith and from Larrin's people, the Travelers, to join the fight. The dangers they face on this unconventional diplomatic mission force Teyla to tell her team that she's pregnant. Sheppard, rattled, brusquely removes her from active duty; Ronon, who is sympathetic to Teyla, guesses that the father is her missing Athosian friend, Kanan.
The allied fleet assembles at the Replicator homeworld. As a fierce space battle erupts in orbit, McKay and Fran beam to the planet. Fran activates herself and the Replicators start fusing together. McKay hacks into the Z.P.M. controls, but before he can finish his job, damage from the implosion knocks out power circuits that he's relying on. With the Replicators on the verge of regaining self-control, everyone must hope that McKay can find another solution - fast.