Jackson traveled to Atlantis when his research suggested that the rebellious Ancient scientist Janus may have hidden a secret lab somewhere within the city. Hoping to find it, and possibly a significant portion of Janus' unauthorized research, Jackson enlists McKay's help to find the rumored laboratory.

Meanwhile, Woolsey plans to go on the Daedalus to a meeting with the Wraith to eliminate their need to feed. Since Woolsey has to go, protocol states that Sheppard must remain to lead the city, since he is the second-in-command. Dr.Jennifer Keller gets ready, packing supplies for the mission. Ronon Dex offers to help and come with her, since the mission involves the deal with "Todd" a few missions ago, and he feels his presence can help protect her from the Wraith. Keller accepts the help, and passes both McKay and Jackson on the way. McKay later realizes that Ronon is with her, which makes him uneasy.

In a certain room, Jackson and McKay find an obscure log entry from one of Janus' assistants, stating that he was going to see Janus when he took a corner to a hallway, and when he came to see him, Janus mysteriously disappeared. They find the isolated hallway, which shows signs of flood damage, since the Expedition emptied it during the first year of their arrival and never gave it a second thought. They find three slits to hold lights, and wonder where they are. They check the CCTV archive from before the hallway was emptied, track the three lights to a storage room, and place them in the slits back in the hallway.

Jackson notices that when touching the lights, they give off separate tones, believing it to be some kind of code. After some trial and error, McKay cracks the puzzle; touching them quickly in sequence causes a series of harmonic pulses which opens up the cloaked lab by magnetically resonating a hidden door from solid to a state which can be walked through. They enter the lab, and start investigating. However a subspace transmitter automatically activates, without their knowledge. Meanwhile, on some ice-covered planet, in another Ancient lab, an obscure figure informs the rest of the group that they must travel to the origin of the signal.

Woolsey prepares a speech for the arrival of "Todd" and his Wraith, but discovers that when the Wraith arrive, they want the work to be completed as quickly as possible, despite "Todd's" skepticism. "Todd" also confesses that even if the drug does work, the Wraith might never go through with it. However, things progress without incident, with the Wraith and Humans working together.

After nearly 24 hours, both McKay and Jackson are still in the lab. At the same time, a hyperspace window opens just above the ocean a few hundred miles away from Atlantis, heading towards the city. The technicians notice this, and they find no IFF signal. They call for Sheppard, who tells them to launch the Puddle Jumpers and to activate the city's shield, since the ship is closing in. However, the mysterious ship manages to zoom right through the shield as if it isn't there. The ship hovers above one of the piers, where a section of the ship opens, with three figures descending down to one of the levels.

The invaders infiltrate the city.

The mysterious aliens in battle armor erect a circular platform. Sheppard and Teyla Emmagan confront them. However, the platform merely cuts through the floors, leading to the corridor near Janus' lab. As the strike teams rush down, Sheppard warns McKay and Jackson, and tells them to leave immediately. However, the aliens stun them both, take the signaling device and take them back to the platform. Sheppard's strike team intercepts one of the aliens, who activates a shield, making it impervious to projectiles. Sheppard's team sees two of the aliens with an unconscious Jackson and McKay lift off back to the ship, while the team finally brings down the remaining alien with enough firepower, depleting the shield and killing it.

A while later, Jackson and McKay wake up and finds that they are in a brig of some kind. They realize that there must have been a subspace transmitter that activated when they found and entered the lab. They attempt to find a way to escape, but there is not enough time, as the ship arrives on the ice-covered planet.

Dr.Radek Zelenka is called into the hallway to examine the dead alien. They take it to the infirmary, where he is to examine the body. However, when he looks for whatever was inside the suit, Zelenka finds that an EM field from the suit renders an Ancient scanner useless. He tries to cut into the suit, but barely leaves a mark before the saw's blade dulls out. He gets a bigger blade and cuts into the neck, which is weaker than the rest. He manages to cut through it, but as this happens, Sheppard notices a flashing light. The team quickly evacuates, just before the suit blows up, which wipes out any chance of identifying the alien race.

McKay and Jackson enter a lab with an Ancient design. They realize that it must be another one of Janus' labs. The aliens tell McKay to activate a device. After doing some research in the computer terminals located in the room, Dr. McKay realizes that it is a very advanced piece of Ancient technology, the "end game machine", which could ultimately stop the Wraith once and for all. The device is meant to disrupt the exact subspace frequencies associated with Wraithhyperdrive systems, causing any Wraith ship that attempts to enter a hyperspace window to be destroyed. Apparently the technology had a serious unforeseeable side effect, so Janus abandoned the research and the project. After Jackson and McKay try to explain all this to the aliens, they are given an ultimatum: either they set up and activate the device, or Dr. Jackson will be killed. Dr. McKay quickly capitulates and the alien leaves them temporarily.

Zelenka thinks that he has found a way to track Jackson and McKay, but has to use a new form of math to backtrack where the other end of the transmission is. He believes they are on M6H-987, a planet with no Stargate, meaning it is off the grid. Atlantis is out of communications range with the Daedalus, so they have to rescue them another way.

The Attero device has been activated.

Jackson realizes that the aliens are possibly using the suit to protect themselves, and they must be hiding their true identities. McKay works on activating the device, and after an unknown amount of time, manages to reactivate it, but without discovering what the side effect is. After about 10 minutes of operation, they still haven't seen any problem, but McKay finally deciphers a log entry explaining it. Jackson asks if they're in danger, but McKay says they're fine, it's the rest of the galaxy that's in danger. He says they have to shut the device down immediately and starts to do so. A group of aliens enter and point weapons at them. They attempt to warn the aliens, since the side effect is very serious, but are stunned before they can explain, leaving the device still running.

At roughly the same time, a ship in "Todd's" fleet hails the Daedalus, and "Todd" speaks with them privately. After inquiry from Woolsey and ColonelSteven Caldwell, "Todd" informs them that two of his ships must depart for the moment, since a rival hive is attacking one of the Wraith outposts. They see the cruisers depart and enter the hyperspace windows. However, both Wraith cruisers are destroyed once they enter hyperspace.

Suspecting an ambush, an angered "Todd" accused them of obtaining the "Attero device". He pulls two energy rods from his coat sleeves and puts them together, creating an energy pulse that knocks everyone on the bridge unconscious. "Todd" assumes control of the Daedalus and starts to transport his other soldiers and assistants on board. Ronon, walking the halls of one of the upper decks, sees the Wraith soldiers beam aboard and take cover. He sees Dr. Keller and insists that they head to the ship armory, since the Wraith are attacking the ship. However, this proves difficult, since "Todd" manages to lock down the ship, limiting the movements of every Human on board.

Back on Atlantis, Sheppard and his team are ready to contact the Daedalus by dialing the Stargate to M5R-179. However, after Chuck dials the Gate, it begins to go critical. They have seconds until the Gate will detonate, which will result in an explosion equivalent to a dozen Nuclear warheads. Sheppard orders the city's shield to encompass the Gate. The Gate explodes, causing a blinding flash. Zelenka works on strengthening the shield, since the longer the shield holds, the smaller the explosion will be if it collapses. However, the shield emitters are overloading, so Sheppard evacuates everyone from the control tower. Only Sheppard and Zelenka remain. The shield is severely weakening. Seconds later, a fairly large explosion rocks the central control tower.

Jackson: It's a puzzle. I think we need to activate these in a specific order.McKay: You mean, like a three digit code? D'you know how easy that'd be to break?! There's only six variations!Jackson: Well, maybe we need to activate them a number of times in a specific order. I don't suppose you recognize any of these three notes?McKay: What, do you mean, like, does it remind me of Janus' favourite Brian Eno track?! No, no such luck.

(Todd arrives onboard the Daedalus)Woolsey: Thank you for coming.Todd: Thank you for having us.Woolsey: (clears his throat) Today is an historic day. Robert Grosseteste once said...Todd: I would like to get started as soon as possible.Woolsey: Y-yes, of course. But I wanted to recognise...Todd: I have my doubts that your plan will be effective... so shall we drop these unfounded pleasantries and get to work?

Caldwell: Robert who?Woolsey: (sighing) Never mind.

Sheppard: Well, I guess I'll go back to being the boss.McKay: How's that going?Sheppard: Pretty boring actually.McKay: Well, you're more than welcome to help us crack this first stream cipher. You know, um, (to Jackson) he could've been in MENSA. (Both snort at the thought)Sheppard: Why don't you contact me when you two geniuses have a breakthrough.

Jackson: Is everything a competition with you?McKay: I'm not sure what you're talking about.Jackson: I just found you a secret lab full of really cool Ancient stuff. I kind of think that should score me some points here.

Jackson: I've spent the majority of my professional life being ridiculed for my theories, most of which turned out to be correct, by the way. I'm kind of used to it, Rodney.McKay: Doesn't that bother you? I mean, there's no vindication, no recognition, no credit.Jackson: Well, I could say the same thing about you. The discoveries you've made, you probably could have won the Nobel Prize five times over by now.McKay: It's too true. So, I guess none of us signed up to get famous, huh?Jackson: No, we did it for the money.McKay: Ha ha ha, Good one!(McKay pauses for the moment and slowly looks to Jackson)McKay: You don't get paid more than me do you?(Jackson rolls his eye)McKay: DO you?

Jackson: Look, given the right amount of time, it's possible we could get the device to function safely, but we'd have to contact our people and bring in a much larger science team. See, I'm not that kind of scientist... and what my friend...Alien: (interrupts and points to McKay) Get the device operational within one hour, or I will kill him. Do you understand?McKay: (quickly) I understand, yes.

Todd: One of our facilities is under attack by a rival Hive. Our two support ships must depart for battle. My Hive will remain here; continue the work with Doctor Keller.Woolsey: I'm glad to hear that.(Both Todd and Caldwell turn and stare at him)Woolsey: Oh, not the "under attack" part. That's unfortunate, of course. I-I just meant ...never mind.

When Dr.Daniel Jacksonbeams into Atlantis, he replies to Woolsey's welcome of "Welcome to Atlantis" with "It's good to be back." This is a reference to the fact that Daniel arrived in Atlantis for the first time during The Pegasus Project which was a crossover between Stargate SG-1 Season 10 and Stargate Atlantis Season 3.

It is stated that the Daedalus is too far away for Atlantis to contact, hence the team dialing a closer planet. However, in "Critical Mass", the Daedalus had a long enough range to be at a point between galaxies where it could communicate with both an SG team on P4M-399 in the Milky Way Galaxy and Atlantis in the Pegasus Galaxy,

At the end of the episode, when the team prepares to travel to M5R-179, Zelenka has Chuck dial the Stargate. However, whenever a team goes through the Stargate in a Puddle Jumper, it is always the Jumper that dials the Stargate, not the Control Room.