When a Jem'Hadar strike force attacks the station, Sisko takes Worf, Dax, Odo, and O'Brien with the Defiant and pursues them into the Gamma Quadrant. The crew comes upon a disabled Jem'Hadar warship emitting a distress signal, and 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 alien 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.

The officers are surprised to learn that they will be working with Weyoun and the six Jem'Hadar. Sisko also tells them 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 Omet'iklan, hints that things will change after their assignment is completed, 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. Their alliance is tested, however, when a Jem'Hadar named Toman'torax attacks Worf. After helping Sisko break up the fight, Omet'iklan kills his man in a display of Jem'Hadar discipline. Sisko refuses to do the same with Worf, however, and Omet'iklan promises to kill Sisko when the mission is over.

Worf learns of Omet'iklan's intentions, and warns the captain against joining the away mission on the planet. Sisko insists on going, however, and promises to 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 bloody battle ensues, but 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. While weaving through the corridors, Sisko saves Omet'iklan's life, much to the Jem'Hadar's surprise. The entire group then escapes the chamber moments before O'Brien's explosive device destroys the Gateway, which allows their weapons to function again. Omet'iklan turns his phaser on Weyoun — killing him for questioning his group's loyalty — but spares Sisko's life. The Jem'Hadar then separate from the Defiant crew with the grim reminder that the next time they do battle, it will be on opposite sides.