What You Leave Behind

"What You Leave Behind" is the series finale of the television show Star Trek: Deep Space Nine, the 175th and 176th episodes, the 25th and 26th episodes of the seventh season. The episode was written by showrunner Ira Steven Behr and Hans Beimler and directed by Allan Kroeker. It originally aired the week of May 31, 1999.

The finale sees the end of the long-running plot arc of the Dominion War and the fulfillment of protagonist Benjamin Sisko's destiny as "Emissary of the Prophets". The episode was mainly well-received, with most critics considering it a satisfying end for the series, though the final confrontation between Sisko and his enemy Gul Dukat was criticized.

Background
Set in the 24th century, the series follows the adventures of the crew of the Starfleet-managed space station Deep Space Nine near the planet Bajor, as the Bajorans recover from a decades-long occupation by the imperialistic Cardassians. The station is adjacent to a wormhole connecting Bajor to the distant Gamma Quadrant; the wormhole is home to powerful alien beings worshipped by the Bajorans as the godlike "Prophets", who have made Benjamin Sisko, DS9's human captain, their "Emissary". The later seasons of the series follow a war between the United Federation of Planets and the Dominion, an expansionist empire from the Gamma Quadrant ruled by the shape-shifting Changelings, which has already absorbed Cardassia; the Dominion's soldiers are the Jem'Hadar, and their administrators are the Vorta.

In the episodes leading up to the finale, the Cardassian officer Damar launched a revolt against Dominion control, aided by the Cardassian ex-spy Elim Garak and the Bajoran officer Kira Nerys; the rogue Changeling Odo, Kira's lover, was cured of a disease afflicting him and the Dominion's Founders; and Gul Dukat, the Cardassian who had been the prefect of Bajor when it was under Cardassian control, disguised himself as a Bajoran and persuaded the power-hungry Bajoran religious leader Kai Winn to follow the Prophets' evil counterparts, the Pah-wraiths.

Plot
As the Federation and their allies prepare to embark on a final offensive in the Dominion War, in a vision, one of the Prophets appears to Sisko as his mother Sarah, telling him his journey's end "lies not before you, but behind you". Soon the battle between the Dominion–Breen–Cardassian and Federation–Klingon–Romulan fleets begins.

Kira, Garak, and Damar, hiding on Cardassia Prime, sabotage Cardassia's power grid, cutting off communication between the Dominion fleet and the command center. In retaliation, the Founder in command orders the Jem'Hadar to wipe out a Cardassian city. Kira, Garak, and Damar are captured, but as the Jem'Hadar prepare to kill them, Cardassian soldiers turn on the Jem'Hadar.

As Starfleet and their allies are suffering many losses, the Cardassian ships switch sides, turning the tide of the battle. When the Founder discovers this, she orders the eradication of the Cardassian race, and the Jem'Hadar begin leveling cities. The alliance fleet prepares to mount a final offensive. Kira and her team storm the command center, capturing the Founder; Damar and Weyoun are killed in the process. The Founder initially refuses to surrender, choosing instead to make the battle as costly as possible for the alliance.

Odo beams to the command center and persuades the Founder to link with him, joining their liquid bodies. He cures her of the Changeling disease, and she orders the Dominion forces to surrender. Odo tells Kira that he has agreed to cure the other Founders but needs to join them permanently. The Founder agrees to stand trial for war crimes and signs an armistice to end the war. Back on DS9, the crew celebrates at Vic Fontaine's simulated 1960s lounge.

Meanwhile on Bajor, Dukat and Winn travel to the Fire Caves with an ancient book to release the Pah-wraiths. Winn poisons Dukat as a sacrifice, expecting to become the wraiths' emissary; they possess Dukat instead, resurrecting him. On DS9, Sisko suddenly becomes aware that he must go to the Fire Caves. Once there, he attacks Dukat, who easily subdues him with the Pah-wraiths' powers. Winn tries to destroy the book, but Dukat kills her. While Dukat is distracted, Sisko attacks Dukat, falling with him and the book into the fiery chasm. Dukat and the book burn up.

Sisko finds himself in the wormhole, where Sarah tells him that the Pah-wraiths and Dukat are trapped forever and will never emerge again. The DS9 crew is puzzled by Sisko's disappearance until he comes to his wife Kasidy Yates in a vision; he assures her he will return, though he doesn't know when.

Many of the crew go their separate ways: O'Brien will teach at Starfleet Academy, and Worf is appointed the Federation ambassador to the Klingon Empire. Kira takes Odo to the Founders' planet, where he joins the Great Link and cures their disease. Kira returns to DS9, now the station commander, and she and Sisko's son Jake gaze out a window at the wormhole.

Production
The title of the episode is based on a quote from Pericles: "What you leave behind is not what is engraved in stone monuments, but what is woven into the lives of others". The episode was written by Ira Steven Behr and Hans Beimler and directed by Allan Kroeker. An early draft of the script had Sisko dying during the final battle at Cardassia, but resurrected by the Prophets to fight the Pah-wraiths. Sisko's joining with the Prophets following Dukat's defeat was originally going to be permanent but actor Avery Brooks was "uncomfortable with the notion of a black man abandoning his pregnant black wife"; the line was rewritten upon Brooks's request to indicate that he would return. Keith DeCandido praised this move in his review. The producers also entertained the idea of a final shot of Benny Russell (from "Far Beyond the Stars" and "Shadows and Symbols") sitting outside a studio holding a script for Deep Space Nine.

The final day of filming took place at Vic's lounge. In the episode, during the party, many of the background hologram characters are actually production staff and recurring cast members without their makeup and prosthetics. This is also one of two Star Trek series finales in which Jeffrey Combs, Michael Dorn, and Colm Meaney appear. Combs later appeared in the Star Trek: Enterprise series finale "These Are the Voyages..." as Shran; and Dorn and Meaney had already appeared in the Star Trek: The Next Generation series finale "All Good Things..." as Worf and O'Brien.

Near the end of the episode, a montage is shown of the ensemble cast with footage from previous Star Trek: Deep Space Nine episodes. The music cues used prior to O'Brien's montage are from the Irish song "The Minstrel Boy", which previously featured in the Star Trek: The Next Generation episode "The Wounded". There are no clips featuring Jadzia Dax, because Terry Farrell and her manager reportedly refused the routine process of granting permission for her appearance in the clips, to the great disappointment of the staff. Ira Steven Behr guessed that Farrell's feelings might have been hurt regarding the staff's choice of flashback clips, and elaborated: "Her manager was informed that we were thinking of using Terry in a scene in the final episode. It would have probably been three hours of work ... maybe four. The price they quoted us was too high for the budget. After all, this was a show where we had to cut out hundreds of thousands of dollars from the original draft."

Broadcast
"What You Leave Behind" was first shown on June 2, 1999 in broadcast syndication. It is the twenty-fifth and twenty-sixth episodes of the seventh and final season and received Nielsen ratings of 5.4 percent on the first broadcast. It is the highest-rated episode of the season.

Critical reception
Keith DeCandido reviewed the episode for Tor.com and while praising the resolution to the Dominion War, said that it failed as the finale to Deep Space Nine, stating that the end of the war and the end of the TV series are not synonymous. He expressed disappointment in the series' failure to resolve Sisko's primary goal of getting Bajor into the Federation. DeCandido compared the episode to other Star Trek series finales, writing, "TNG revisited the trial of humanity by the Q from its first episode, Voyager got our heroes home from the Delta Quadrant, and Enterprise ended with Earth helping form the Coalition of Planets that would eventually mutate into the Federation. But DS9 blew the landing by treating the show like Star Trek: The Dominion War." He rated the episode 6 out of 10.

Zack Handlen of The A.V. Club referred to it as an imperfect series finale. He said that of the "handful of deaths in 'What You Leave Behind', ... Damar's is the only one that really stings." Reflecting on the way in which everyone went their separate ways, Handlen wrote, "That's what this finale is about to me. Not the end of the war, or the death of some bad guys, but the reminder that there are so many stories that go on without us."

Jamahl Epsicokhan of Jammer's Reviews summarized the episode as a "poignant and satisfying end to the final arc and the series". Like Handlen, he was "somewhat disappointed" by Damar's death, as it came in "an action scene and with very little fanfare". As a key element of the story arc, Epsicokhan stated "it's almost as if there simply wasn't time to deal with the death of the man who would've been the leader of a new Cardassia. The notion seemingly is: He's dead; on with the story." He ultimately said that the episode made for a nice ending, writing that the "closing sense is more one of 'life goes on'", and gave the episode 3.5 out of 4 stars.

Both Epsicokhan and Den of Geek's Gem Wheeler favorably noted the comparisons between the final shot of the episode and the events of "The Visitor", with Wheeler writing that the latter episode gains in emotional impact after watching the series finale.

Many reviewers criticized the Pah-wraith storyline and its resolution. DeCandido had been heavily critical of the direction of Dukat's character following "Sacrifice of Angels", writing "There's an argument to be made that the world would've been a better place if ["Sacrifice of Angels"] was Dukat's last appearance", as well as the Pah-wraiths following their introduction in "The Assignment", writing that the evil counterparts of the wormhole aliens were "so lazy", "something out of a bad 70s adventure show", and "one of the most wrongheaded plot devices in DS9's history"; with exception to "Covenant", where he had written that "The fact that this is [...] the only Pah-wraith episode that doesn't have alien possession, glowing eyes, and people firing ray-beams out of their fingers is not a coincidence [as to why he liked the episode]", he had repeatedly said how much he despised "the entire concept of the Pah-wraiths". He saw the final confrontation between Sisko and Dukat as "a stupid side plot involving fire caves, glowy eyes, magic books, and a simply endless amount of shouting", leading to a "totally absurd confrontation" which reduced the "alienness of the Prophets [and] the depth of the rivalry between Sisko and Dukat [to] yelling at each other and then tumbling into a fire", labeling it as "cheap-ass melodrama". Zack Handlen was more forgiving, summarizing "The end of the Pah-Wraith saga is functional without being in any way good. Winn and Dukat get their just deserts, but neither of their fates are thrilling or insightful. [...] Given all the build-up, this wasn't much of a resolution." Jamahl Epsicokhan shared some of DeCandido's sentiments "concerning the nature of Dukat's twists and turns since his downfall last season in 'Sacrifice of Angels'", writing that "'Waltz' was a powerful episode but left Dukat headed in a direction that didn't seem nearly as interesting as the complex layers in what came before." While Epsicokhan found the "epic struggle of good vs. evil, Prophet vs. Pah-wraith, Sisko vs. Dukat [...] entertaining ([with] plenty of neat-looking fire and fury [to] help set the stage of melodrama)", he said that Deep Space Nine had "always been more compelling when dealing with shades of grey, not cut-and-dry absolutes". Epsicokhan wrote that if Sisko, Winn, and Dukat's final confrontation hadn't been such a disappointment, he would have rated the episode 4 out of 4 stars.

In 2007, DVD Talk said " If you were ever a fan of DS9 you'll remember this as the fantastic finale that wrapped just about everything up"

Taken as the last two episodes of a seven episode story arc starting with "The Changing Face of Evil", Comic Book Resources (CBR) ranked this episode as part of the #1 episodic saga of Star Trek overall. They praise the "great" crew montage and note the many plotlines being wrapped up, as well as the special effects work of Star Trek space battles.

In 2016, The Hollywood Reporter ranked the two-episode finale as the ninth best episode of the series overall. In 2016, Empire ranked this the 30th best out of the top 50 episodes of all the 700 plus Star Trek television episodes.

In 2020, ScreenRant said it was the second best series finale of all Star Trek series, and noted an IMDb rating of 9.0 out 10.

Awards
The episode won the 2000 Best Television Episode SyFy Genre Award.

Home media
It was one of the episodes included in the anthology DVD box set Star Trek Fan Collective - Captain's Log; the set also includes episodes from other series in the franchise including Star Trek, Star Trek: The Next Generation, Star Trek: Voyager, and Enterprise. The other DS9 episodes included in the set were "In the Pale Moonlight" and "Far Beyond the Stars", and the episodes include an introduction/interview by Avery Brooks (Sisko in the series). The set was released on July 24, 2007 in the United States.

Both parts of this episode were released in 2017 on DVD with the complete series box set, which had 176 episodes in a 48 disc set.

Legacy
This episode was novelized by Diane Carey, who would also go on to novelize Star Trek: Voyager's finale, "Endgame". Carey had also novelized "The Search", "The Way of the Warrior", "Trials and Tribble-ations", and the season six six-episode opening arc. An official series of novels, the Star Trek: Deep Space Nine relaunch, chronicles multiple characters' exploits following the events of this finale. Otherwise, Worf is the only character to appear on-screen after this series, in Star Trek: Nemesis.

In 2017, eighteen years after the episode aired, Ira Steven Behr announced a crowdfunded documentary named What We Left Behind, deriving its title from the name of this episode, which met its goal of $150,000 within 24 hours. Released in 2019, the documentary reflects on Star Trek: Deep Space Nine's legacy, featuring interviews with the cast and crew of the series and speculating on what would have happened had there been an eighth season.