Enemy at the Gate

"Enemy at the Gate" is the twentieth episode of the fifth season of Stargate: Atlantis and the landmark 100th and final episode of the series.

Synopsis
"Todd" informs the Atlantis expedition that a rogue group of Wraith has acquired several Zero Point Modules to power a formidable new Hive Ship, and wants it destroyed. However, after the Daedalus is disabled, they learn that the ship is heading straight for Earth, and they must stop it before it gets there.

Plot
Todd contacts Atlantis and reveals that a Wraith subordinate has mutinied and managed to use several Zero Point Modules, acquired during the destruction of Asuras, to power a formidable new Hive ship. He urges Richard Woolsey to attack and destroy it before it becomes a threat to Atlantis. On board the Daedalus, Colonel Steven Caldwell, Lt. Colonel John Sheppard and the rest of the team rush to engage the new Super-hive. But the vessel proves itself an impressive opponent, crippling the Daedalus before making a sudden and inexplicable jump into hyperspace.

Puzzled over the Wraith's sudden departure, Dr. Peter Kavanagh on board the Daedalus picks up a weak subspace signal in Wraith code. Dr. Rodney McKay is quick to recognize that the communique was sent, through subspace, from an alternate reality. Once deciphered, their worst fears are realized: the Wraith message contains a familiar set of coordinates — the hive ship is on its way to Earth. McKay is able to calculate where the hive ship will drop out of hyperspace before reaching Earth, of which they can notify Stargate Command via Atlantis once the communications array is repaired.

The team returns to Atlantis once the Daedalus ' engines are repaired, but are dismayed to learn from a video transmission sent by Colonel Abraham Ellis that both Earth's starships, the Apollo and the new Sun Tzu, have failed miserably to stop the Wraith ship, with the Apollo, in bad shape herself, taking on crew from the crippled Sun Tzu. Sheppard interrogates Todd for the location of more ZPMs, which Major Evan Lorne and his team are able to locate; Atlantis, now with her full complement of three ZPMs, will return to Earth in a last-ditch effort to defend it. Sheppard expects to be the one flying the city, but he is informed by Woolsey that he will be returning back to Earth. The task of flying the City ship then falls to Dr. Carson Beckett (much to the surprise and irritation of Dr. McKay.)

Beckett launches the city and Sheppard returns to Earth via the Stargate, alone, to command the chair from the Antarctic outpost at Major General Jack O'Neill's request. Back on Earth, Colonel Samantha Carter is temporarily in charge of Stargate Command (due to Major Hammond's sudden death), and Major Paul Davis informs Sheppard that the Wraith ship has arrived shockingly earlier than anticipated and is now on the other side of the moon, sitting still and doing nothing. They assume it is going to complete its integration with the ZPMs and then attack Earth. Sheppard is able to convince Carter and Davis to let him lead a squadron of F-302s refitted with Nuclear warheads, which are diverted to intercept Wraith Darts sent to destroy the Ancient Control chair (which had been relocated to Area 51), in advance of the main Wraith attack. The attack succeeds and with the chair destroyed, Earth is defenseless; Sheppard volunteers to go on a suicide mission to destroy the hive ship from the inside with the nuke onboard his F-302.

Meanwhile, International Oversight Advisory dignitaries prepare to escape Earth to the Alpha Site (Davis quips as "courageous to the end") but discovers the Wraith have overridden Earth's gate. At the very edge of the Milky Way galaxy, Atlantis' hyperdrive disengages due to overtaxing. Woolsey tries to dial Earth, only to find that it has dialed the hive ship above Earth — Ronon Dex, Teyla Emmagan, Lorne, and McKay enter the gate to infiltrate the hive ship. Meanwhile, Sheppard separately infiltrates the hive with his F-302 through the Dart bay, unbeknownst to the rest of the team. In a desperate battle on board the hive ship, Ronon is stabbed in a fight with two Wraith warriors. The knife has pierced his lung, and he dies from the resulting blood loss; with Teyla and McKay visibly upset, Lorne forces them to leave his body behind.

Back on Atlantis, with the hyperdrive out of commission, Dr. Radek Zelenka proposes activating a highly experimental and potentially dangerous Wormhole drive based on the same wormhole technology as the Stargate. With it, they could potentially reach Earth in seconds.

On the hive ship, just as Sheppard is about to activate his nuke, he receives a radio transmission from McKay who suggests activating it by remote, allowing the team to escape through the Stargate to the Alpha site. Sheppard and the team return for Ronon's body, only to discover the Wraith underling has revived Ronon for interrogation; the team kills the Wraith underling and his two guards and is able to rescue Ronon.

However, Sheppard and his team run out of time as they attempt to reach the gate and stopped in a corridor, Sheppard prepares to activate the nuke with all of them still on board. Thankfully, Atlantis arrives in position between the Hive and Earth to buy them more time. Atlantis takes the brunt of the hive ship's assault on Earth and launches a barrage of Drone weapons in retaliation. The sheer force of the Hive's weapons' fire is pushing the city ship into Earth's atmosphere, and it is straining the shields. With little power left, Beckett can either adjust the course of Atlantis, or keep firing at the enemy ship; Woolsey gives the order to keep firing. The team manages to escape to the Alpha Site, and the nuke successfully detonates, destroying the hive ship, but Atlantis is now forced to make a landing through Earth's atmosphere, risking burning up during re-entry.

Everyone at Stargate Command waits for news with bated breath, but erupts into celebration when Atlantis lands successfully over water. Although the re-entry caused a giant fireball across the sky, the city is able to cloak before landing, and the area in which they land, just past the Golden Gate Bridge on the Pacific Ocean side, is placed under naval quarantine, so for now at least, Earth's population is still in the dark.

Sheppard visits Todd, who's still locked in a holding room. Todd boasts about his help in saving Earth because of his ZPMs and asks if Sheppard has come to kill him, but Sheppard does not respond. Ronon is visited in his Atlantis infirmary bed by Sheppard when Amelia Banks walks in. She takes him to join the rest of the senior Atlantis staff on a balcony overlooking the Golden Gate Bridge in San Francisco.

Notable Quotes
McKay: Kavanagh. What the hell are you doing here?

Kavanagh: Reassignment. More fun and adventure in the Pegasus galaxy.

Todd: I may have acquired a few more than I let on.

Woolsey: How many more?

Todd: Let's not get caught up in unnecessary details.

Woolsey: I like… details.

Sheppard: The other ZPMs you talked to Woolsey about? Tell us where to get 'em, and maybe it'll improve your situation.

Todd: Am I supposed to be enticed by this offer?

Sheppard: No. I'll probably kill you anyway. But, don't forget, this Wraith betrayed you and got away with it. For no other reason, you might want to do it out of pure spite.

(Todd leans back, studying Sheppard.)

Todd: You...know how to talk to me, John Sheppard.

(about Todd's credibility for the ZPMs)

Woolsey: He actually came through for us.

Sheppard: Maybe he's turning over a new leaf.

Woolsey: Get those down to Zelenka immediately.

Lorne: Yes, sir.

(Lorne starts to leave.)

Sheppard: Or maybe they're going to blow up when you plug them in.

Woolsey: (changing his mind) Have Doctor McKay check them first.

Lorne: Right...

(McKay makes some final adjustments on a control panel.)

McKay: (into radio) All right. I've finished recalibration on the chair. Radek, how are things at your end?

Zelenka: (over radio) ZPMs are online and functioning one hundred percent. We're good to go.

McKay: Okay! Who's flying this puppy?

(Beckett quickly enters the room.)

Beckett: That would be me.

McKay: (confused) Carson?

Beckett: Rodney.

McKay: What, they called you in for this?

Beckett: Aye.

McKay: You must have a higher CIA than I thought.

Beckett: Excuse me?

McKay: Chair Interface Aptitude. We have a... we have a ranking system.

Beckett: Well, apparently, after Colonel Sheppard, I'm number two.

McKay: (skeptical) Really? I'll have a look into that.

Woolsey: You're being asked to fly to another galaxy...to take - what might turn out to be the losing part - in a battle that isn't yours.

Ronon: You mean like everyone on this base has been doing for the past five years?

Teyla: Thank you for your consideration, Mr. Woolsey, but I assure you it is not necessary.

Ronon: We're not goin' anywhere.

Woolsey: (proudly) Very well.

(The Wraith underling revives Ronon and demand information about the rest of the team)

Wraith underling: Where are they?!

(The Wraith underling gets his answer as Sheppard and the others show up and kill him and his guards)

(The hive ship explodes in orbit of Earth)

Major Davis: They did it! The hive's been destroyed!

Carter: Atlantis this is Stargate Command, well done!

Woolsey: Thanks for the kind words, Colonel, but I wouldn't pop the champagne just yet. We've lost orbit, and Doctor Beckett is unable to compensate. We're goin' in!

Carter: Do you have enough shield to survive reentry?

Woolsey: We're about to find out.

Sheppard: Well, how you feeling?

Ronon: Ready to get out of here.

Sheppard: Take your time, the city's pretty banged up. Even with the ZPMs we're not going anywhere for a while.

Ronon: And when they fix it, you really think they're going to let us take it back to Pegasus?

Sheppard: I'll make sure you get home.

Ronon: This is my home.

(last lines)

Keller: (to McKay) You OK?

McKay: I'm alive. (Keller laughs) And I've got you, what else would I need?

Sheppard: Nice view.

Woolsey: Yes... yes it is.

Goofs

 * When Carter tells Sheppard that they're renaming the Phoenix, she mistakenly says they're renaming it "the General Hammond", while the ship is actually named the George Hammond. It's possible she either intended to say it was named after General Hammond, or that they'll be naming it the George Hammond, but ship names do not tend to include the titles of their namesakes. In Stargate Universe and Stargate Atlantis: Legacy, the ship is called by its proper name, the George Hammond.
 * When Atlantis begins taking fire from the Super Hive, Amelia Banks reports that the shields were reduced to 70% after the initial volley. However, it was previously established that Atlantis' shields do not lose strength as long as they have sufficient power to activate, unlike most other shielding systems that have been encountered. Rather, they either run at 100% or they don't raise at all.
 * When Todd communicates with Atlantis at the beginning of the episode, he is clearly speaking through a MALP. However, there would be no reason for a MALP to be on the planet Todd dialed from and as he contacted Atlantis, Atlantis would not have sent one there.
 * While McKay was able to reconfigure the Wraith's DHD to work for Milky Way addresses, it is not explained as to how he would've known how Pegasus glyphs translate to Milky Way glyphs, as this was the first and only time a DHD was used to locally dial a gate of a different network.

Wins

 * Won Leo for "Best Overall Sound in a Dramatic Series" (Kelly Cole, Patrick Ramsay, Bill Mellow, Joe Watts, Hugo DeLaCerda and Kevin Belen)
 * Won Leo for "Best Sound Editing in a Dramatic Series" (Jay Cheetham, Steve Smith, Kirby Jinnah, Matthew Wilson and Jason Mauza)

Nominations

 * Nominated Gemini for "Best Visual Effects" (Mark Savela, Jason Gross, Paul Hegg, Brandon Hines, James Kawano, Alec McClymont, Krista McLean, James Rorick and Luke Vallee)