On Atlantis, McKay is complaining about the special arrangements they're making to greet a visitor and the time it's taking away from his work. He and Sheppard arrive at the Gate Room to meet Woolsey, and they all greet Daniel Jackson as he beams down from the Daedalus. McKay is unimpressed, and skeptical of Daniel's theory that the rogue Ancient scientist Janus had a secret research lab inside of Atlantis. Daniel has found a record of an assistant noting that Janus disappeared down a dead-end hallway and McKay takes an interest.
Woolsey is preparing to depart on the Daedalus to meet with Todd the Wraith, believing he'll go through with their gene-treatment experiments. As second-in-command, Sheppard is forced to stay behind on Woolsey's orders. Meanwhile, Ronon helps Keller carry her equipment as she prepare to go on the mission, and suggests that he should go along to protect her. She agrees and as they depart, McKay notices that they're going together and isn't happy.
He and Daniel check the reported hallway and find missing sconces in a flooded area, and they check the records the team took t the time. Going over the files, they spot the three loose fixtures on the ground. They pull them out of the salvage bay and insert them into the fixtures. Daniel notices that each one makes a different note and works out the code sequence. As he does, McKay notices something about a nearby wall and has Daniel push on the wall while he triggers the sequence. Daniel passes through the seemingly solid wall and Rodney goes in after him. They find themselves in Janus' laboratory.
As the laboratory lights up on its own, a console comes to life on a distant planet and a helmeted figure notes that the device has been activated.
As the Daedalus proceeds to the rendezvous, Keller talks to Woolsey, who is writing an introductory speech.
Daniel and McKay bring in a team to check out the lab and Sheppard is duly impressed. However, all of the data is heavily encrypted and it'll take time to decipher. There's not much Sheppard can do and he goes back to commanding the base.
The Daedalus rendezvous with Todd's Wraith cruiser and receive their delegation. Woolsey, Caldwell, Keller, and Ronon meet with Todd and his group and Woolsey tries to give his speech. Todd is unimpressed and insists they get to work.
On Atlantis, McKay and Daniel work late into the night and Daniel wonders why McKay is so competitive. He admits that he's used to people viewing his theories with skepticism and notes that McKay isn't recognized for much of his work. They're unaware that outside a hyperspace window has opened up on the ocean and a small ship emerges. Sheppard gets to the bridge and orders shields up and Jumpers ready. The ship easily passes through the shields, something only Ancient ships can do. Sheppard has Teyla and a team of marines meet him at the pier where the ship has stopped. Three armored figures emerge from the ship and enter the city, then place a circular metal plate down. They step on to it and it creates a force field which then drops through the floor. Sheppard and his people realize they're heading for the secret lab.
Sheppard calls McKay and Daniel and tells them to get out, but the three invaders arrive and stun them, then take a device from a table. Sheppard and his team arrive but are unable to get past one of the invaders' personal force fields. Two of the intruders depart with Daniel and McKay while Sheppard and the others finally manage to overwhelm the rearguard invader. The ship departs through the force field and leaves via hyperspace. Zelenka examines the downed invader and determines that he's seemingly dead, but suggests they put it under a medical scanner.
McKay and Daniel wake up aboard the alien ship in a force field cell.
On Atlantis, Teyla realizes the invaders stole a specific device and they go through the laboratory. Sheppard and McKay separately figure out that something in the lab gave off a subspace signal and the aliens discovered another lab. When they received the signal, they followed it to Atlantis and took what they needed. However, Daniel and McKay have no way to escape from the ship while it's in hyperspace.
Zelenka is unable to penetrate the armored suit and they realize they've made first contact with one of the advanced alien races Dr. Weir warned them about. Sheppard orders Zelenka to cut open the suit, but the scientist has no success until he cuts through the neckpiece. However, as he starts to cut through a unit on the chest piece starts flashing. Sheppard orders everyone out and the device blows up, destroying the suit and its contents.
Keller discusses the results of her research with Todd, insisting it will work. He's skeptical and she wonders if he wants it to work. He admits that he can see the benefits but it will be difficult for him to convince his people. Todd wonders what they will be if they no longer have to feed, and how it will alter their society.
The alien ship arrives at an ice planet and lands at a base. The invaders take Daniel and McKay to a lab and order them to get the device working. They have no choice but to go to work with McKay taking the lead.
Atlantis goes to high defensive status and Zelenka comes up with a way to try and track the hyperspace signal from the device. Meanwhile, McKay realizes the device is an Endgame Machine, which can put an end to the Wraith once and for all. It creates a subspace turbulence that targets the Wraith hyperdrive technology, causing it to self destruct. Janus tested the device 10,000 years ago and had to shut the project down due to side effects. McKay can't determine what the effects are, but notes that while they can activate the device he's not sure that they should. Daniel suggests they reason with their captors. They give McKay one hour to get the device functional or they'll kill Daniel. Daniel wonders why the aliens are still wearing their suits even out of battle and concludes it's a protective device. McKay goes to work while Daniel tries to figure out who the aliens are and why they need the suits.
Zelenka identifies the invaders' planet and it doesn't have a Stargate. Sheppard departs in a Jumper and heads for the Daedalus for a rendezvous so it can head for the invaders' planet.
McKay gets the device working but Daniel tells him that he'd rather die then possibly see a solar system destroyed as a result. However, McKay notes that it would just postpone the inevitable to let Daniel die and they go ahead and activate the device. It works fine and there are no noticeable side effects… yet.
Todd's Hive sends him a message requesting permission to send his two support ships into battle. Todd okays the attack and the ships depart into hyperspace… and self-destruct. Todd thinks the humans are responsible and says they've found the "Attero Device." He activates a stunner, knocking out the entire bridge crew, and begins beaming troops aboard the Daedalus.
Ronon is in the corridors when he sees Wraith soldiers beaming aboard. He gets Keller and they head for the armory to get her a gun. Todd locks off the bulkheads from the bridge and they're cut off from the armory.
After ten minutes, McKay finds a log entry explaining the side effects which will affect the entire galaxy, including Atlantis. He starts to shut down the device but the aliens stun the two of them before they can succeed.
Sheppard and his team prepare to depart through the Stargate by Jumper. However, power builds up within the wormhole from within the event horizon. Zelenka can't shut down the Stargate and warns that it will overload and explode in about 90 seconds. Sheppard has Zelenka collapses the city gate around the shield just in time The field emitters won't last long enough to contain the blast before it runs it course. Sheppard orders everyone out as Zelenka works to draw all necessary power from the city. Zelenka warns that it's not enough. A few seconds later the tower explodes.