After a group of Jem'Hadar in a stolen freighter attack Deep Space Nine, Sisko pursues the vessel into the Gamma Quadrant aboard the Defiant with Worf, Dax, Odo, and O'Brien. The crew comes upon a disabled Jem'Hadar warship which is transmitting a distress signal. The Defiant then transports aboard the survivors, six Jem'Hadar and Weyoun, their Vorta master. Weyoun reveals that they were attacked by the same Jem'Hadar who surprised Deep Space Nine. He then tells Sisko privately that the attackers are Jem'Hadar renegades who have turned against the Dominion and are trying to restore an ancient Iconian Gateway - a sophisticated Transporter that would give them the power to go anywhere instantaneously. This could give them the potential to take over the Gamma Quadrant and the Federation. Sisko agrees to join Weyoun and destroy the Gateway, which is located on the surface of a remote planet. Weyoun also offers Sisko the position as the leader of the Alpha Quadrant, as Weyoun believes the Federation will soon fall to the Dominion. Sisko declines Weyoun and tells him not to be so certain that the Federation will fall.
The Defiant crew then learns that they will be working with Weyoun and the six Jem'Hadar, and they learn that the Jem'Hadar don't know about the Gateway. They think they are only out to stop the disloyal renegades. Later, Sisko establishes order by insisting that the Jem'Hadar First, Omet'iklan, follow his command and hints that things will change after their assignment is completed, and they form an uneasy alliance.
Omet'iklan tells Sisko that the only way this troops will respect Sisko's crew is to fight alongside them on the planet, then suggests they work in mixed teams, only Weyoun refuses. But when Omet'iklan reveals that his men already know about the Gateway's existence, Sisko agrees, and the Jem'Hadar and Defiant crews begin working together. The Jem'Hadar and the Defiant crews both drill aboard the Defiant. Omet'iklan again shows displeasure with how the Defiant crew performs and insists that things be done the Jem'Hadar way. This leads to tension between both crews, especially between Worf and Toman'torax. However Jadzia gets along with Virak'kara, the Jem'Hadar assigned to her, and they even have a conversation which depicts the differences between the two. Jadzia is surprised that the Jem'Hadar rarely live longer than 15 years due to their constant involvement in combat. In fact, they are ready to fight when they are only 3 days old. Virak'kara tells her that he would be honored to reach the age of twenty, and is astonished when Jadzia admits she herself is over 300 years old.
Their alliance is tested when Toman'torax attacks Worf. After breaking up the fight, Sisko and Omet'iklan demand an explanation. Toman'torax and Worf both admit they started the fight, Toman'torax states that he must be punished for disobeying orders. Omet'iklan then kills Toman'torax in the fashion of Jem'Hadar discipline. Omet'iklan then expects Sisko to kill Worf, however Sisko refuses. As a display of Starfleet discipline, Sisko confines Worf to quarters when he is off duty. Omet'iklan is disgusted and informs Sisko he will kill him when the mission is over.
Dax lets Worf know of Omet'iklan's threat and warns the captain against joining the away mission on the planet. Worf also tells Sisko that if Omet'iklan does make good on his threat, he will not live to boast about it. Sisko insists on going anyway, but assures Worf that he will watch his back. The Defiant soon arrives at the planet. When the teams transport to the surface, however, they learn that their phasers and combadges have been rendered unusable by the energy from the Gateway just as a team of renegade Jem'Hadar materializes before them and attacks.
A short but vicious battle then ensues, and all the key players on Sisko's team manage to survive this initial confrontation. The group makes its way to the Gateway chamber, engaging in hand-to-hand combat all the way. At the Gateway, a renegade Jem'Hadar attacks by surprise and Sisko saves Omet'iklan's life while risking his own. Omet'iklan wants to know why Sisko would save his life. Sisko tells him, "If you have to ask, you'll never understand." The entire group then escapes the building moments before O'Brien's explosive device destroys the Gateway, allowing their weapons to function again. Omet'iklan then kills Weyoun with his phaser, for questioning his loyalty and that of his soldiers. He compliments Sisko for the way they fought together, but reminds him that the next time they meet, they will be enemies again. Omet'iklan and his soldiers stay behind to hunt down the remaining Jem'Hadar for their disloyalty to the Founders.