Enemy at the Gate

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

Synopsis
"Todd" informs the Atlantis Expedition that a rogue group of Wraith have 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 ("Kenny") 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 Woolsey to attack and destroy it before it becomes a threat to Atlantis. Onboard the Daedalus, Colonel Caldwell, Colonel Sheppard and the rest of the team rush to engage the new Hive ship. But the Z.P.M. powered 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, Kavanagh onboard the Daedalus picks up a weak subspace signal in Wraith code. McKay is quick to recognize that the communique was sent, through subspace, from another 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! Rodney 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 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 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 to Earth. The task of flying the City ship then falls to Carson Beckett.

Carson launches the city and Sheppard returns to Earth via the Stargate, alone, to command the Ancient weapons platform at General O'Neill's request. Back on Earth, Colonel Samantha Carter is temporarily in charge of Stargate Command, and Major 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. Sheppard is able to convince Carter and Davis to let him lead a squadron of F-302's refitted with nukes, which are diverted to intercept Wraith darts sent to destroy the Ancient weapons chair (which had 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, I.O.A. dignitaries prepare to escape Earth to the Alpha site (to whom Major 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, Teyla, 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 onboard 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, Zelenka proposes activating a highly experimental and potentially dangerous 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 is stopped by 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 Kenny the Wraith has revived Ronon for interrogation; the team 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 onboard. 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 drones in retaliation. The sheer force of the Hive's weapons fire is pushing the city ship into Earth's atmosphere, and it is straining on 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, 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 is placed under naval quarantine, so for now at least, Earth's population is still in the dark.



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

Notable Quotes
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.

John: Well, how you feeling? Ronon: Ready to get out of here. John: Take your time, the city's pretty banged up. Even with the ZPM's 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? John: I'll make sure you get home. Ronon: This is my home.

(last lines) Keller: (to Rodney) 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.

Background notes

 * Carter reveals to Sheppard she is leaving the SGC to command the Phoenix, which has been renamed to General Hammond in honour of the General who has died (in an homage to Don S. Davis, who played the role).
 * In this episode, Dr. Beckett is the last person seen in an Ancient Control Chair and he uses that chair to fire drones. In "Rising", the pilot episode, Dr. Beckett is the first one seen in the chair, and his first act was to accidentally fire a drone. We also learn that he has the second best Control Interface Aptitude, after Col. Shepard. Rodney is mildly annoyed by this and in "Rising", he was annoyed that he didn't have the Ancient gene.
 * This is the second time the a Hive has entered hyperspace rather than continuing to fire on the Daedalus; a similar instance occured in "Allies" when two regular Hives entered hyperspace just as the Daedalus planned to retreat. Those Hives also had left after learning of Earth's location.
 * Samantha Carter, Walter Harriman and Kevin Marks all appear in the finales of both SG-1 and Atlantis.
 * John Sheppard, Rodney McKay, Teyla Emmagan and Carson Beckett are the only characters to appear in both the pilot and finale of Atlantis.
 * Christopher Heyerdahl appears in both the pilot and finale though as different characters; in the pilot he played Halling and in the finale he played Todd.

Production

 * Unlike the 100th episode from Stargate SG-1, this is not a comedy episode, but the producers said they "have something big in mind."
 * This episode does not go out on a cliffhanger and the first Stargate Atlantis movie will wrap up the storyline.
 * This episode was to premiere in January, however an unfinished copy (a DVD screener) was leaked to the internet on December 22, 2008.
 * Brad Wright stated: Don't expect a final and total defeat of the Wraith, just because the television series is ending. Some storylines will be wrapped up by series end, but the Wraith will continue to be a presence beyond our 100th episode.
 * Joseph Mallozzi stated: Does Season Five end on a cliffhanger? "Depends what you mean by 'cliffhanger. Not so much. It's a great story that Paul and Joe wrote. It's a terrific script, and there's a 'What now?' aspect of it. That's for sure. But there's no fingers dangling on the edge of a cliff, as we have done in the past."
 * Joseph Mallozzi mentioned in the December 15-21, 2008 issue of TV Guide (pg. 33) that things come to a full closure in this episode and a rogue Wraith leads an invasion of Earth.
 * At the end of the original airing of this episode on Sci Fi Channel, there is a brief trailer for Stargate Universe, saying that the first episode would premiere sometime in Summer of 2009.
 * This episode shares its title with the World War II film Enemy at the Gates.