The Last Man

"The Last Man" is the twentieth episode and finale of the fourth season of Stargate Atlantis.

Synopsis
While searching for Teyla Emmagan, John Sheppard gates to Atlantis, where he discovers he accidentally traveled 48,000 years into the future in an abandoned Atlantis, with deserts replacing the ocean. A hologram of Rodney McKay comes up and gives him a chance to get back to the present, to prevent a future in which everyone dies.

Plot
On M4S-587, Lieutenant Colonel John Sheppard and Major Evan Lorne wait for their Genii contact, where he claims to have information regarding Teyla Emmagan, who was kidnapped by "Michael". However, the contact didn't turn up, and decide whether the Genii are reliable, since they tried to have Harmony killed, but Ladon Radim didn't order the hit, trying to get on their good side. With luck running out, Sheppard gates back to Atlantis, leaving Lorne to stay for a while in case the contact does show up. Sheppard returns to Atlantis. However, he notices something different; the city is empty, with no power on at all, as well as a glow of red from the daylight and the fact the temperature has raised. He calls for anyone, but has no answers. He then decides to look outside, but has trouble opening the door. When he is out, he sees that the oceans have mysteriously turned to desert.

Sheppard desperately tries to activate the city's systems, but can't. He then hears static, and hears a voice, Doctor Rodney McKay, who wants to know of Sheppard's position, and what has happened. He then tells him to go to the Holo room. Sheppard runs to the Holo room, and activates the projector, where an aged McKay materializes, who is powered by a Mark XII naquadah generator, which is tapped into the city's internal sensors. He tells Sheppard that he is a hologram of himself from 25 years since Sheppard was missing. He also relates that Sheppard was involved in a freak accident involving a solar flare, similar to the one where SG-1 was transported to the year 1969, but instead of traveling back in time, he went forward in time, by 48,000 years, likely making Sheppard the last man alive in the Pegasus Galaxy.

Fortunately, the hologram of McKay didn't just come to chat with Sheppard. Instead, he has a plan to send Sheppard back to 2008, by waiting for a similar solar flare to send him back. The problem is that he would have to placed in a stasis pod for at least another 800 years. This is the only chance, since if he returns later than two months since he was missing, it would be too late. McKay reveals that two months after Sheppard was missing, they announced him KIA and had a funeral, without Sheppard's body. The team later received solid intelligence on one of Michael's labs, where they finally found Teyla, who had delivered her baby, but was killed by Michael.

Michael then used the baby to perfect his Hybrids, and later administered the Hoffan drug on every single planet in Pegasus. The Atlantis Expedition, with their limited personnel attempted to lessen the mortality rate of the drug, but were unsuccessful. With the Wraith's food supply tainted, their civil war went into full swing, and within a year, the Wraith were brought to their knees. Michael's army captured a Hive Queen, where he told her that when he escaped from the Humans, he expected a warm welcome back, but was met with scorn instead. With his anger, he personally decapitated her and showed her head to his army.

Now that Sheppard is aware of the situation, he realizes that if he rescues Teyla, he can stop all this from happening. However, on their way to the stasis room, he and McKay see the corridor is blocked off by a mountain of sand, and there is no other way out. The only other option is a trek across the sand to a nearby tower but Sheppard can't walk across the sand due to a sandstorm that is raging outside. He decides to wait it out, while Holo-McKay tells him what happened to the others. He explains that with Michael in control of the galaxy, the IOA were hesitant in giving out resources to help stop him. However, Colonel Samantha Carter didn't take no for an answer. They handed her a new Daedalus class ship, the Phoenix. Since it was barely off the assembly line, Carter, McKay and maybe Radek Zelenka, since McKay doesn't remember, tirelessly helped finish installing the Asgard systems on the ship. After they were finished, Carter told McKay to return to Atlantis, while she would strike back at Michael.

Carter and the crew performed several guerrilla-style ambushes, where they would exit hyperspace, strike at Michael's Hive Ships, and jump out again. Despite terrible odds, Carter inflicted considerable damage to Michael's fleet. However their luck soon ran out. They found intel that Michael will strike at a planet, not knowing Michael's army supplied Carter with misinformation. When the Phoenix arrived, the ship was ambushed, and several systems, including the Asgard plasma beam weapons went offline. The Phoenix fired conventional nuclear warheads, but did not cause much damage. With the ship's hyperdrive and other engines reaching critical, Carter evacuated the entire crew. With the transporters down, Carter was left with little choice but to set a collision course for one of Michael's Hives. The Phoenix charged into a Hive Ship, where the force of the explosion destroyed the other two attacking Hives.

Back in the alternate Atlantis, Holo McKay has discovered why the ocean turned to desert; the sun is dying, turning into a red giant, which will heat the planet so much, that in 500 years time, the planet would be so hot, the atmosphere will burn, which will kill Sheppard the second he exits stasis. Sheppard decides to use the city's solar panels to power the shield (although most likely it was collapsed to protect only a small area) along with the naquadah generator, which will buy them enough time for Sheppard to return to the present. Then, since he can't wait due to hunger, he covers his face and attempts his walk across the harsh desert. He pressures McKay to keep talking, by asking what happened to Ronon Dex.

After the death of Teyla and the apparent death of Sheppard, Ronon no longer felt welcome in Atlantis, and left. He learned that Michael was planning to convert the populations of the stronger worlds into Hybrids, and destroy the weaker civilizations. Ronon planned and developed an army to take down Michael. With the galaxy in a state of panic, he didn't have trouble in finding volunteers. The recruits were mainly farmers, but Ronon taught them every assault tactic he could. The Atlantis Expedition also supplied them with Earth weapons, particularly C-4 and P90s. After he felt his army was ready to fight, they embarked on several operations to take down the Hybrids.

In one particular mission, they attempted to destroy one of Michael's labs. There, they ran into an old friend, "Todd", who also planned to destroy the base. When they heard of Michael's army zeroing in on the base, Ronon evacuates his army, while he and "Todd" use the C-4 to blow the base, but wishing to allow his forces to escape, the two hold off the Hybrids, until Ronon's soldiers radio him that they have evacuated. With no way out, Ronon and "Todd" decided to detonate the C-4, where they shared a smile to each other, before Ronon detonated the explosives, killing them all, and destroying the base.

Sheppard, having survived the trek, is unconscious. After a whole night, he wakes up, and quickly agrees they should go to the stasis pod. They arrive in the stasis room, where Holo-McKay tells him to take a crystal, containing the address to the planet where Michael plans to kill Teyla. Before he steps in, Sheppard wants to know what happened to McKay. Jennifer Keller planed on a mission to help more lives in the galaxy, only to be stopped by the new Atlantis leader, Richard Woolsey. He told her that since Michael's forces had taken over the galaxy, the IOA ordered all resources to be pulled for the protection of the city. Disgusted by this, Keller quits the Expedition. McKay decides to quit as well, and both leave on the Daedalus back to Earth.

During their time, the two grew closer and closer, until by the time they returned to Earth, they weren't colleagues any more, and are seeing each other. Over the next year, McKay got a high paying job in an Aerospace engineering firm, while Keller headed her own practice. Things were fine between them, until Keller fell ill. When she turned to Stargate Command, the doctors discovered traces of the Hoffan drug in her systems, and told her that she was dying. With this, McKay had a revelation to prevent the whole thing from happening. However, Keller told him to stop, since there is no point in chasing after something that is already gone. She died three days later.

After 25 years, with help from his sister, Jeannie Miller, he finds a way, and presents the idea to Lorne, who was then a General in the SGC. He convinced Lorne to take him to Atlantis to enact his plan. After McKay finishes relating this, Sheppard enters stasis.

Back in the present, Atlantis' Stargate activates, where Chuck reads Sheppard's IDC. Sheppard returns, and discovers that he has returned after 12 days since he went missing. He tries to convince Carter of the news that he can find Teyla, but she find this far-fetched. When McKay notices the solar flare, they believe Sheppard is telling the truth. Carter sanctions the mission to M2S-445, the planet Michael is planning to kill Teyla. Lorne joins Sheppard's team.

On M2S-445, the teams arrive in Michael's base, where they split up. Sheppard and Ronon find a room, with several brutal surgical implements. Sheppard observes that this is the "sick, twisted version of a maternity ward", which means this is the room where Michael plans to to both deliver the baby and kill Teyla. Meanwhile, McKay and Lorne enter another room, where McKay finds a relic computer. There, McKay discovers that the information is Michael's database, containing his Hybrid research and planets where he is conducting the research. For a moment, the team is excited at the prospect of Michael's downfall, until the computer shuts down, and a timer activates. The base is booby trapped, and while the teams desperately try to run, they are too late. The base collapses in on them, leaving the teams trapped.

To be continued...

Notable quotes
McKay: (over radio) Look, I need you to describe exactly what you're seeing. Where are you? Sheppard: I'm in the Control Room, it's deserted. McKay: Is there any power? Sheppard: No, everything's dead, and, oh yeah, did I tell you the ocean's gone? McKay: Sorry, what? Sheppard: The big blue thing out the window. It's gone. It's, it's, it's a desert, and it's about a hundred and twenty degrees in here. McKay: Oh, jeez, the planet must have undergone some serious climate changes.

Sheppard: You're telling me I just traveled forty eight thousand years into the future in ten seconds!? Holo McKay: I know, it is kind of cool when you think about it, isn't it. Sheppard: Surfing a thirty foot wave in Waimea is cool! Dating a supermodel is cool! This is not cool!!

Holo McKay: There's not enough power for you to gate back to Earth, and without a MALP, going anywhere else would be far too risky. It is entirely possible that you are the last human being alive. Sheppard: You're not doing a very good job of cheering me up here. Holo McKay: Oh, consider yourself lucky, young man.

Encountering their way is blocked Holo McKay: The sand has penetrated the lower levels. Sheppard: 48,000 years into the future, you've still got a knack for stating the obvious. All right, what do we do? Holo McKay: I don't know. Sheppard: What do you mean, you don't know? Holo McKay: Well, I wasn't programmed for this variable! Sheppard: You said you had twenty five years to work on this plan! Holo McKay: Well, McKay did, and he brilliantly anticipated a lot of potential problems! It's just that, well, this wasn't one of them.

Background notes

 * This is the first episode where a Wraith hive ship is seen being destroyed by Asgard plasma beam weapons.
 * In previous episodes regarding solar flares and time travel, the traveler was sent back to the planet they left from. In this episode, Sheppard emerges at his destination.
 * Other instances where a solar flare sent a traveler back in time were the episodes 1969 and 2010 of Stargate SG-1, and Stargate: Continuum.
 * This episode contains the first appearance of the Phoenix, albeit in another timeline.
 * In General Lorne's office, the portrait of Atlantis that he was painting from the episode Sunday can be seen hanging on the wall.

Production

 * Robert Picardo returned as Richard Woolsey to lead the city in the alternate timeline.
 * The episode shares its title from a science-fiction novel called The Last Man.