While Sisko, Ross and Martok plan a final assault in space, Kira and Garak lead the Cardassian resistance on the ground into Dominion headquarters and overtake the Briefing Room. Kira orders the Female Shapeshifter to surrender, but she refuses; soon after, the defiant Weyoun is killed by Garak.
When Kira alerts Sisko to the situation on Cardassia, Odo asks to meet with the Female Shapeshifter. In the Fire Caves, Winn poisons Dukat with a glass of wine — and presents his body as a religious sacrifice to the Pah-wraiths. Hoping to commune with the Female Shapeshifter, Odo links with her and heals the Shapeshifter of the disease that has ravaged their people. Transformed by the experience, she orders a cease-fire. Eager to cure the rest of the ailing Shapeshifters, Odo informs a deeply saddened Kira that he is returning to his homeworld.
With the signing of surrender documents, the war officially ends. Later, Worf agrees to become the Federation Ambassador to Kronos and O'Brien announces that he's returning to Earth to teach. The crew holds a farewell party for Worf, O'Brien and Odo. Meanwhile, the Pah-wraiths bring Dukat, as a Cardassian, back to life in the Fire caves, and Sisko abruptly leaves the party — after a vision from the Sarah Prophet — to visit the site. Sisko confronts Dukat, and Winn is sacrificed to the Pah-wraiths; Sisko tackles Dukat and, along with the text of the evil Kosst Amojan, they plunge into the fiery abyss. Sisko "awakes" in a great vision: the Sarah Prophet assures him that he has completed his task by returning the Pah-wraiths to the Fire Caves; she then informs Sisko that he must now join the Prophets.
Back on the space station, Kasidy has a vision of Sisko in which he explains his reason for remaining with the Prophets — and he promises to return someday. In the meantime, Jake Sisko grapples with his father's departure; Bashir and O'Brien bid a fond farewell; Ezri Dax says goodbye to Worf; and Kira leaves Odo on the Changeling planet where a sea of ailing Shapeshifters awaits his curative link. At Deep Space Nine, Kira takes command of the Captain's chair, Ezri and Bashir plan their future, and, despite her own feelings of loss, Kira reaches out to comfort a fatherless Jake.