Season Seven: end of the war
Season Seven charts further dilemmas of conflict. Following the example of Season Six, the writers considered using an arc to conclude the multiple Dominion War threads in satisfying fashion, deciding that Star Trek: Deep Space Nine could not be concluded in one or two episodes alone. A ten-episode arc was outlined to end Season Seven, the Dominion War, and all of Deep Space Nine, and more alterations were made as scripting progressed.
Characters face issues of genocide: in "Treachery, Faith, and the Great River", Constable Odo learns of the engineered virus that Section 31 has disseminated among the Founders, and in "When It Rains..." that Section 31 has infected him to communicate the disease. While Dr. Bashir supports providing the Founders with a cure, others are unconvinced.
In “Penumbra”, it is revealed that the Dominion is receiving logistical support from the Son'a, who begin production of the Ketracel-white needed for the Jem'Hadar. Another opponent reveals itself when the Breen Confederacy signs a pact with the Dominion in "'Til Death Do Us Part". For "The Changing Face of Evil", writers Ira Steven Behr and Hans Beimler scripted a second strike against the Federation through a Breen assault on Earth. Later, with the addition of their new Breen allies, the Dominion retake the Chin'toka system, which sees the destruction of a number of Klingon, Romulan and Federation ships including the USS Defiant. Ronald D. Moore has stated: "We wanted to kill the Defiant as a statement on how tough the Breen were. We thought that would rock the characters and the audience." Behr explains that, "... the ship had become a character that had caught on in people's hearts and minds ... when the Defiant went down, that hurt."
The resurgence in the conflict provided opportunities to introduce problems such as post-conflict psychological trauma in "The Siege of AR-558" and injury when the character of Nog undergoes leg amputation in "It's Only a Paper Moon". Moore has said that the plot of this episode was agreed on after an "extended argument" between Behr and Deep Space Nine creator Rick Berman and that such discussions were a common occurrence when war casualties were considered. Michele and Duncan Barrett perceive the allusions made to the traumas of World War I.
The concept of resistance is re-opened in the context of Cardassia rather than Bajor. Legate Damar becomes more and more frustrated with the deadlocked conflict and his situation as a Dominion puppet. As Cardassian military losses mount and Dominion control of Cardassia deepens, he becomes alcoholic and criticizes the Dominion's power. Damar was originally to be revealed as a double agent for the Federation, but Moore then suggested the slave revolt of Spartacus as a model. Damar establishes an underground resistance movement, is branded a rebel, and goes into hiding. Kira, Garak, and Odo are sent as "technical advisors" to help him in "When It Rains...".
The relationship between Cardassians and Bajorans, former enemies turned allies, is charted in "Tacking Into the Wind", in which Damar and Kira's group abandon prejudice and collaborate to seize a Breen weapon. Continuing into "The Dogs of War", Damar is forced to choose between his Cardassian comrades, stubborn in their beliefs, and the support of Kira and others whom he used to consider enemies. As the tide turns against the Dominion, cut off from the Gamma Quadrant and without technological advantage, a last stand is prepared. The Female Changeling orders the destruction of a metropolis, Lakarian City, to coerce the Cardassians back into line, but, instead, the Cardassian fleet defects, passing the advantage to the Alpha Quadrant alliance. Consequently, an attempted extermination results in the deaths of 800 million Cardassians in a Dominion bombardment.
Allusions to genocide contrast with ethical discussion concerning the engineered "Founders disease" and a potential cure. In "Extreme Measures", the characters of Dr. Bashir and Chief O'Brien locate a treatment inside the mind of Section 31 agent Luther Sloan. A moral debate ensues on what constitutes genocide. While Bashir supports offering a cure to the Founders, Sisko determines that the disease should be left to continue crippling the powerful opposition. However, in "The Dogs of War", Odo declares that this amounts to genocide of his species and is handed a treatment by Bashir. In return for the Dominion's peaceful surrender, and the arrest of the Female Changeling on charges of war crimes, the Alpha Quadrant alliance permits Odo to heal the rest of his people.
The Treaty of Bajor is signed aboard Deep Space Nine in the Season Seven finale, "What You Leave Behind, Part II". The conclusion to the Dominion War arc formed the resolution to Deep Space Nine as a series, and a moment for the production staff to settle the destinies of the main characters. Berman and Behr agreed with Paramount that the final episode of the series should concentrate on human drama rather than the endgame of the Dominion War. Moore opines the production staff succeeded in ensuring the Dominion War acted as a means of deepening characterization. Although further plots would have been scripted had Deep Space Nine continued into an eighth season, Behr accepted the resolution of the Dominion War at the end of Season Seven.