"Lifeline" is the second episode of the fourth season, and the 62nd episode overall, of the science fiction television series Stargate Atlantis. The episode first aired in the United States on October 5, 2007 on the Sci Fi Channel, and subsequently aired October 16 on Sky One in the United Kingdom. It was written by executive producer Carl Binder, and directed by Martin Wood. The episode is a continuation of the previous episode, "Adrift", following Colonel Sheppard and his team as they perform a mission to steal a Zero Point Module from the Asurans. It was described by executive producer Joseph Mallozzi as a "big op eppy."
The episode was considered to be somewhat of a send off to Elizabeth Weir (played by the departing Torri Higginson). Although Wood was credited for directing, he was occupied with directing the movie Stargate: Continuum, so Andy Mikita did most of the actual directing for the episode. It received slightly lower ratings than "Adrift", but was still well received.
To ensure the mission to steal a Zero Point Module is a success, Dr. McKay (David Hewlett) proposes to use Dr. Weir (Torri Higginson) and her nanites to access the Asuran collective and guide them; should the Asurans take her over, McKay would activate a kill switch on the nanites, which would also effectively kill Weir. With their experimental jumper ready, Sheppard (Joe Flanigan) leaves Teyla (Rachel Luttrell) in command of Atlantis. The jumper's hyperdrive works and they arrive over the Asuran homeworld (M7R-227). With Weir's access, Sheppard and Ronon (Jason Momoa) easily steal the Zero Point Module. McKay then finds a code that will cause the Asurans to attack the Wraith and convinces Sheppard to upload a programme to reactivate this dormant code.
McKay initiates an anti-Replicator field to protect them from the Asurans, but Oberoth (David Ogden Stiers) discovers this and sends a wave to override the field. Weir leaves McKay, confronts Oberoth and uses his power to freeze all the Asurans, even tricking him into believing that he has captured the team, all to buy Sheppard enough time to upload the programme. However, Weir struggles to keep Asurans frozen, and when Sheppard finds her just as she loses control, she orders him to leave her behind as the Asurans unfreeze and capture her. The team escapes without Weir, but end up trapped as they lack the power to make it to hyperspace. They are unexpectedly assisted by the Apollo, who have found Atlantis with Colonel Carter's (Amanda Tapping) help. The Apollo lays down covering fire long enough for the team to land in the fighter bay and carries them back to Atlantis. However, the Apollo is unable to lock onto Doctor Weir and beam her aboard. Now fully powered, Sheppard sends the city to M35-117, a back-up planet, and makes a rough landing onto its ocean. Whilst the team mourns the loss of Weir, McKay regains contact with Stargate Command. Dr. Zelenka (David Nykl) announces that the Asurans have begun their attack against the Wraith, meaning Weir's sacrifice was not in vain. Carter tells Sheppard that they will miss Weir, though Sheppard vows to find her again.
"Lifeline" first surfaced in February 2007. Carl Binder wanted to do a heist episode during the off-season, though the writers had no idea where it would fit in the overall season arc. However, as "Adrift" was written, they realized their heist story flowed naturally from it. Even though Martin Wood was credited for directing the episode, Andy Mikita ended up directing most of it instead, as well as directing parts of "Adrift"; Wood was directing Stargate: Continuum at the time of filming. Amanda Tapping requested that showrunners Mallozzi and Mullie not give her a big part for the episode, as she was in the Arctic filming for Stargate: Continuum. Another reason that Carter's appearance was small was that Torri Higginson was still a part of the show, and the producers wanted Carter to be introduced slowly. The episode, as a "third part", was difficult to write, since the second part ("Adrift") is a comeback resolve of the first part ("First Strike"), and the third part has to "resolve the resolve." In the writing stages, there was also talk as to whether or not to save the experimental hyperdrive jumper. Eventually it was decided that it would be saved, to keep open the possibility of using it again.
Tapping felt acting on the new show went a little easier when filming Carter scenes with Bill Dow ("Bill Lee"), with whom she had previously worked on Stargate SG-1. She said another factor that made acting on Atlantis easier was the welcoming cast and crew of the series. Tapping's hair was longer than it was during her time on SG-1, and the military approved of the change as long as it was worn up. To save money on visual effects, the crew built set pieces to represent some of the buildings on M7R-227 and placed them in front of the puddle jumper set. Another measure taken as a substitute to visual effects was to cast mime artists as the frozen Asurans.
While filming Weir guiding the team to find the ZPM, the fact that she can see "everything" without looking at anything was a hard sell for an actor, but with Higginson's drive in her eyes, this would make the scene more believable for the audience. The scene was not written in the original script. The set for the core room in the Asuran city was the same set as Atlantis' gate room, though in order to make it look as different as possible, the cameras were placed at angles not usually used for filming in the gate room, such as where they would normally place lights.
The episode earned a 1.1 household Nielsen rating, which was down by one-tenth of a point or 8% from "Adrift". It fell behind ECW on Sci Fi (with a 1.2 rating), Eureka (with a 1.4 rating) and Ghost Hunters (with a 1.5 rating). In the United Kingdom, "Lifeline" received 443,000 viewers, placing Stargate Atlantis as number six in the top ten broadcasts for Sky One for that week, behind The Simpsons and Prison Break. It was positively received by most critics. Tory Ireland Mell of IGN rated the episode a "masterful" 10 out of a possible 10, praising the slow introduction of Carter, rather than having an SG-1 team member forced into the series, and stated the episode gets the viewer "glued to the television for one hour." Critical Myth rated the episode 8 out of 10, stating the episode as "light on plot twists but packs an emotional punch," and was somewhat critical for the lack of surprises in the episode's storyline. Brett Love of TV Squad liked the episode's storyline, and thought Weir's exit was executed well, despite leaks from the Internet that Weir would be leaving, and compared the scene between her and Oberoth to the confrontations between Neo and Agent Smith from The Matrix film series. However, Love was critical about the absence of Teyla throughout the majority of the episode.