Odo and Kira have landed on a lone planet in the Omarion Nebula, which they have discovered is Odo's homeworld. A Female Shapeshifter encourages him to begin the slow process of learning who he is, and discovering the bond they share, known as the "great link." Odo is pleased to be reunited with his people, but they don't like Kira because she is a "solid" lifeform. Meanwhile, forced to abandon the Defiant during the Jem'Hadar attack days before, Sisko and Bashir are traveling alone in a shuttle when O'Brien and Dax, who have met the Founders, rescue them. Upon returning to the space station, Sisko learns that the Federation is negotiating a peace treaty with the Dominion, represented by one of the Founders, Borath.
When Sisko finds out that the Romulans have been excluded from the peace talks, he expresses his concern to Admiral Nechayev, but she dismisses his fears. On the other side of the wormhole, Kira is unable to contact Sisko because of interference from a hidden power source, while Odo struggles with his "lessons" at shapeshifting. Later, the Female Shapeshifter tells Odo that they came to this secret planet a long time ago, as a result of persecution at the hands of the Solids, then reveals he was sent as an infant to explore the galaxy, then return home.
While looking for Odo, Kira discovers a locked door — something for which shapeshifters would have no use. This arouses her curiosity. Back on the space station, a fight erupts between O'Brien and a Jem'Hadar soldier because the newcomers have been given free reign. Sisko then discovers that the Federation has signed the treaty, agreeing to give control of the Bajoran sector — including the station and the wormhole — to the Dominion. Over Sisko's objections, he and his crew will be reassigned.
A happy Odo tells Kira he has decided to remain with his people, but Kira asks him to help her get to the hidden power source before she departs. He is intrigued when Kira reveals it is behind the locked door she has found. Meanwhile, Jem'Hadar soldiers shoot Romulan officer T'Rul in cold blood, then attack an outraged Sisko. Deciding that matters have gotten out-of-hand, Sisko then bands with Garak, Dax, Bashir, and O'Brien on a suicide mission to steal a Runabout, collapse the wormhole, and keep the Dominion on its side of the galaxy forever.
Garak is killed while Sisko and the others escape. Once aboard the Runabout, they fire on the wormhole, collapsing it in a blinding explosion. Meanwhile, Odo unlocks the mysterious door, where he and Kira find Jem'Hadar soldiers waiting. The two are taken to an interrogation room where Sisko and the Defiant crew sit with their eyes closed, devices attached to their heads. Borath is there, revealing that he is really a Vorta, experimenting on the crew to determine how much they will sacrifice to avoid war with the Dominion. The Female Shapeshifter then arrives, disclosing that her people are the mysterious Founders. Saddened that his own race is responsible for so much death and misery, Odo demands that his friends be released, then chooses to return with them. Surprised that their experiences since the Defiant attack didn't really happen, Sisko and the crew head back to the station. Knowing the truth about his people, Odo realizes now that, even though he may feel like an outsider, his place is with his friends.