Odo beams down to talk with the captured Founder. He asks her to stand down her forces yet she retorts that she believe that the Federation Alliance would invade the Gamma Quadrant just as they previously reciprocated. Odo denies it as the Federation wouldn't sanction it nor would allow the Klingons or Romulans to do so. He suggests he can cure her and they link, against the better judgment of Garak. After joining briefly for only about ten seconds, the Female Changeling is cured; she can assume her normal, smooth-featured shape. She had also communicated to Odo, during their link, that she will order the surrender of all Jem'Hadar; moreover, she will stand trial for her actions in the Alpha Quadrant. With the Female Changeling facing years (possibly a lifetime) of incarceration, Odo vows to be the one who delivers the cure to the Great Link, and tells Kira that he will be rejoining the Great Link for good.
On the battered surface of Cardassia Prime, Martok lustily drinks his bloodwine in victory, but Sisko and Ross, devastated by the carnage they see, refuse to drink.
At Dominion headquarters, Garak and Bashir reflect on how many Cardassians died in the genocide – over eight hundred million. Garak tells Bashir he will be staying on Cardassia, and admits he'll be missing the lunchtime chats.
The Female Changeling surrenders, ending the Dominion WarAboard DS9, the Female Changeling signs the official instrument of surrender, officially ending hostilities between the Dominion and Federation Alliance. After the ceremony, Martok and Ross offer Worf the Federation ambassadorship to the Klingon Empire. Sisko agrees, although he will hate losing Worf on DS9. Martok, on the other hand, is grateful to have an ambassador he can go Targ hunting with on Qo'noS. Kira, who doesn't want to lose the love of her life, asks Odo to return after curing the Founders. He explains how painful it will be for him to leave her, but that the only way for the Founders to learn to trust solids will be for him to remain in the Link.
The crew mingle in Vic's lounge for celebration and, in some cases, farewells. Among the groups, Jake is asking Miles if they already found a place to live to which Miles responds they have some locations in sight. He receives much help from the present staff, with Worf even suggesting Minsk. Quark, who is getting to be a regular at Vic's, encourages everyone to stay put, citing his distaste for change. Sisko tells Quark to get used to it, as things are going to be very different from now on. As everyone gives the moment pause, Captain Sisko lifts his glass in a toast:
"To the best crew any captain ever had. This may be the last time we're all together. But no matter what the future holds, no matter how far we travel, a part of us... a very important part, will always remain here, on Deep Space 9."
Just then Vic starts to sing The Way You Look Tonight to the assembled crew, who came aboard Deep Space 9 distanced, suspicious and sometimes hostile towards each other, yet despite all this grew into close colleagues and friends. As the couples take to the dance floor, Benjamin suddenly has a strong sensation. As the Emissary, he now understands what his task is. Benjamin excuses himself abruptly from the party and heads to the shuttlebay.
On Bajor, Dukat, is resurrected by the Pah-wraiths and regains his Cardassian visage, his eyes glowing red with their power. He taunts Winn, saying she wasn't good enough to be the Pah-wraiths' emissary. He reveals to her that the Pah-wraith plan to spread across Bajor, the Celestial Temple the Alpha Quadrant, even the entire galaxy. He then nonchalantly notes that Sisko has arrived. Sisko raises a weapon at Dukat but the Pah-wraiths' power is strong, however, and with a flick of his wrist, Dukat causes Sisko to drop the weapon and fall flat to the ground. He recovers and punches Dukat, to no avail. Dukat, controlling Sisko's movements, causes him to bow in front of him. Winn grabs the Book of the Kosst Amojan, intending to cast it into the fire pit, but it suddenly appears in Dukat's hands. Dukat summons the fire, which engulfs Winn Adami, vaporizing her.
With Dukat concentrating on Winn and her death, he is momentarily distracted from the Emissary. Sisko summons all his courage and strength, and, with a shout of determination, lunges at Dukat, propelling both men (and the Book of the Kosst Amojan) into the fire pit. As they tumble through the flames, Dukat and the book disintegrate, but Sisko's consciousness lives on as the Emissary. Still appearing as Benjamin Sisko, in his Starfleet uniform, he materializes in the celestial temple. Sarah, the prophet, gives him both good news and bad. The good news is that the Emissary succeeded in his mission by returning the Pah-wraiths to the Fire Caves, and by destroying both the book and Dukat he has trapped them there forever; the bad news is that, since his mission is now complete, the Emissary will never be able to return to his former, corporeal existence.
On DS9, The others explain to Kasidy that they found Sisko's runabout but there was no sign of him. Just then, the Emissary comes to Kasidy in a vision. Relieved to see her beloved husband, she embraces and kisses him one last time. He informs her that he will not be coming back, and Kasidy now realizes the "sorrow" predicted by the prophets. Now speaking in non-linear riddles himself, he solemnly declares his role as Emissary, speaking of destiny, of having a great deal of things to do and learn. However, he promises Kasidy that he will return "in a year, or maybe... yesterday". They say their goodbyes, and then suddenly Kasidy is back on DS9, telling Jake she has spoken to his father.
Odo tries to depart the station quietly in the runabout, without having to say goodbye to anyone. Quark confronts him in the corridor, asking for some sort of goodbye, but Odo refuses. Regardless, Quark raises a toast to him and still believes that Odo "loves" him. Miles and Julian part company with a big hug and misty eyes, having become the best of friends after serving seven years together. Kira pilots Odo's runabout to the Changeling planet. Beaming down to the surface, they say their tearful farewells. Odo morphs his uniform into his tuxedo, which was always Kira's favorite outfit, and slowly walks into the "ocean" of Changelings. Odo's cure slowly spreads throughout his people, saving them all.
Colonel Kira, comfortably situated in the commanding office on DS9, congratulates Lieutenant Nog on his promotion. She has left Sisko's baseball on the desk. She goes to crack the whip on Quark, who had been taking bets on the selection of the next Kai; her strict demeanor reminds him of a similar encounter with her seven years earlier. Kira joins Jake on the Promenade, and they look out the window at the Bajoran wormhole, which is finally open for travel again after two years of war. They look towards the Celestial Temple and the Gamma Quadrant, where Jake's father and Kira's beloved have both gone, remembering lost friends and loved ones, yet remaining eternally optimistic about their future as life goes on at Deep Space 9.