"What You Leave Behind" is the series finale of the television show Star Trek: Deep Space Nine, the 175th and 176th overall episodes, and 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 on June 2, 1999.

Final episode of star trek deep space nine? OK. Let's think. My stream of consciousness:
The relevant information to answer the above question is: "What You Leave Behind" is the series finale of the television show Star Trek: Deep Space Nine, the 175th and 176th overall episodes, and the 25th and 26th episodes of the seventh season. The answer is What You Leave Behind.