On Atlantis, a wormhole comes in and they receive a signal from Todd the Wraith. He informs them the treatment has worked although it was painful. He explains that his shuttle was destroyed due to an attack by one of his underlings. Woolsey isn't interested until Todd explains his underling obtained a ZPM. The group is skeptical and figure Todd wants their help to reestablish his power base. However, Todd has volunteered to place himself in their custody, and McKay warns that if the Wraith have a ZPM-powered Hive ship, they're in serious trouble.
Woolsey meets with Todd who explains that he acquired a few ZPMs and they weren't all destroyed with the cloning facility. One of his underlings developed a means to harness the ZPMs' power and attacked Todd. He warns that if they wait, the Hive will be unstoppable.
The Daedalus heads into warp and Sheppard meets with Todd. Sheppard warns him that if Todd betrays them, he'll kill him. On the bridge, Sheppard tells Caldwell to come out of hyperspace early and his team will take in a cloaked jumper. Caldwell agrees and the jumper approaches Todd's designated coordinates. They detect a Hive with high energy readings which are being used to boost the hull thickness of the Hive ship. The Hive ship powers weapons and McKay realizes they can see them. Sheppard takes evasive action and calls in the Daedalus. The Hive wings them and McKay works to override the systems and regain control. The Daedalus works and blocks the Hive attack, then returns fire. However, they do only minimal damage and detect a massive energy buildup. The Hive ship fires multiple energy barrages and the Daedalus takes heavy damage. McKay regains flight control but they can only watch as the Hive ships departs into hyperspace.
Caldwell wonders why the Hive ship left and McKay figures that the Wraith fled because they maxed out the current energy source. The Daedalus is dead in space but Marks reports that they've detected a subspace signal. McKay determines the signal was sent from another reality and that it contains the coordinates for Earth. They figure the Wraith are heading for Earth and McKay suggests he extrapolates where Hive ship will drop out of warp to regenerate it's hull, and they send the Sun Tzu and Apollo to intercept it before it becomes too powerful.
The Daedalus returns to Earth and Woolsey informs them only the one Hive ship is heading for Earth. The bad news is that the Apollo and Sun Tzu were badly damaged and unable to significantly damage the Hive ship. There's nothing between the Wraith and Earth.
McKay suggests they take Atlantis to Earth but they need a full compliment of ZPMs. Sheppard has already figured out the same thing and talks with Todd. He asks Todd to give him his other ZPMs, noting he'll be able to get revenge on his underline. Todd agrees and gives them the coordinates. Major Lorne recovers the ZPMs and they check them for sabotage. Woolsey tells Sheppard that he'll be taking the Stargate back to Earth to man the Ancient weapons platform in case Atlantis doesn't get there in time.
Sheppard arrives at SGC and Colonel Carter greets him. Meanwhile, on Atlantis they finish calibrating the ZPMs and Beckett as the number two ranked chair aptitude person, takes control of Atlantis. The Atlantis lifts off into space and proceeds to Earth.
Carter is in charge of the SGC in Landry's absence. They've detected the Hive ship which has arrived early and is in orbit around the Moon. They figure it's completing its ZPM upgrades and Sheppard suggests they arm their F-302s with nukes. Carter is reluctant but Sheppard insists they need to take the fight to the Wraith.
On Atlantis, Woolsey talks to Teyla and Ronon and offers them one last chance to stay in the Pegasus Galaxy. They both insist on staying.
Carter tells Sheppard that it's too late: they've detected an incoming wave of Darts. The Wraith believe the control chair is in Area 51 since that's where it was in the alternate reality. However, the chair has been moved to Area 51 in this reality as well. The Darts enter Earth's atmosphere and Sheppard leads the outnumbered F-302s against them. Two Darts head for Area 51 and Sheppard moves to intercept. Two more Wraiths intercept Sheppard and his wingman is shot down. Sheppard takes a hit and SGG realizes the Darts are on a kamikaze run. The Darts slam into Area 51, destroying it, while Sheppard manages to regain control of his F-302 just in time. However, Earth's final defense has been destroyed.
Sheppard ignores orders to return to base and heads toward the Hive ship with his nuke. He has enough fuel to establish orbit and then shut down all systems. He plans to wait until the Hive ship arrives and then flies his way inside and detonate the nuke inside.
Atlantis drops out of hyperspace near the edge of the Milky Way and McKay struggles to figure out what's wrong. Woolsey prepares to Dial Earth and let them know the situation.
As the Hive ship approaches Earth orbit, SGC discovers that the Wraith have their own Stargate and are Dialing in to keep the SGC from dialing out. Atlantis discovers the same thing when they realize their wormhole has connected to the Wraith Hive ship. They toss a few grenades through to neutralize the guards and then Ronon takes a team through to sabotage key systems. Zelenka suggests to Woolsey that they have been working on the possibility of creating a wormhole drive that can get them to Earth in a matter of seconds. However, if the calculations are off by even a fraction they'll be in serious trouble.
Sheppard activates the F-302 systems and heads for the Hive ship. Inside the ship, Ronon, McKay, Teyla, and Lorne come under fire and they try to find another way around. Wraith attack Ronon and McKay, and Ronon is stabbed in a lung. He tells them to go on but Teyla refuses to abandon him. Ronon stops breathing and they're forced to leave him. Outside, Sheppard blasts his way into the Dart bay and then contacts SGC and informs them he's arming the nuke. He leaves a last farewell message for Atlantis with Carter.
McKay intercepts Sheppard's signal and realizes that he has a nuke. They contact him and tell him to stop. McKay says he can rig a remote detonator and they have a way to get off the Hive ship. On Atlantis, Woolsey informs Keller they're about ready to activate the wormhole drive and she needs to be ready for combat casualties.
Sheppard finds the others and they inform Sheppard that Ronon was killed. Meanwhile, a Wraith revives Ronon and binds his wound, then demands answers. Ronon refuses to talk and the Wraith tortures him. Sheppard and the others arrive and gun down the Wraith.
The Hive ship has completed the surface scan and prepares to target military installations. They head for the Stargate but warn they need ten minutes and Carter informs them the Hive is ready to fire. Sheppard takes the detonator but Carter tells them they've detected another ship. Atlantis arrives and Beckett fires the drones at close range. Sheppard and the others head for the Stargate while the Hive ship fires back at Atlantis. The shields hold and McKay works on the DHD controls while Sheppard's team holds off the Wraith. The weapon fire has pushed the Atlantis into low orbit, draining the shields, and Beckett can't divert power from the weapons.
McKay finishes the calibrations and dials the Alpha site. The Atlantis shields collapse while Sheppard and the others escape through the Stargate. Sheppard activates the detonator and gets through last just as the nuke explodes, destroying the Hive ship.
The Atlantis plummets through Earth's atmosphere. After a few tense moments, Woolsey contacts SGC and informs them they've survived the descent. Carter contacts Washington to notify them that Atlantis is coming home.
Later, Sheppard visits Ronon in the infirmary. Sheppard promises to make sure Ronon gets back to Pegasus, but he notes that Atlantis is his home. Technician Banks comes in to take him for a walk.
Sheppard goes to see Todd, who takes credit for helping them. Todd wonders if there'll be a next time and Sheppard just stares at him.
Banks takes Ronon out on the balcony where everyone else has assembled to observe the Golden Gate Bridge. Atlantis is cloaked and the entire area is under naval quarantine. McKay admits that he's alive and has Keller, and doesn't need anything else. Sheppard and the others take in the view.