“Enemy at the Gate” is episode twenty of season five of Stargate: Atlantis and the season and series finale.
Todd the Wraith contacts Atlantis, asking for help. He has been attacked by an underling who has equipped a hiveship with a zero point module, one got from the Replicator city before it was destroyed, which makes him a big threat.
The Daedalus encounters the hiveship, which is becoming bigger, stronger and more powerful, and is on the losing end of a battle when the hiveship jumps to hyperspace. It detected the subspace transmission with Earth’s co-ordinates broadcast from another reality at the end of the previous episode “Vegas”.
After the hiveship knocks out the two ships sent to stop it, the only thing that may get there in time is Atlantis itself – which means they need some more ZPMs. Colonel Sheppard returns to Earth to take command of the Ancient weapons platform in Antartica, whilst Dr. Beckett flies Atlantis to the Milky Way. The hiveship gets to Earth too quickly, leaving Earth having to defend itself before Atlantis turns up. Colonel Carter makes an appearance in this episode.
A pretty decent conclusion to the series, full of desperate situations and last minute rescues.
Notably, one of the starships is named the Hammond, after General Hammond, who was stated to have died. This was a tribute to actor Don S. Davis, who played General Hammond and who had died of a heart attack. The Hammond also appeared in the pilot episode of Stargate Universe.