After detecting evidence of an unstable wormhole in a nearby solar system, Voyager's sensors find something even more unusual: evidence that a replicator from the Alpha Quadrant is in use on one of the planets. Janeway sends Paris and Chakotay down to the planet Takar to investigate, and they find a pair of Ferengi being worshiped as gods by the locals because of their advanced technology.
When they return to the ship, Paris and Chakotay learn that the Ferengi con artists, Kol and Arridor, arrived in the Delta Quadrant seven years earlier, victims of an attempt to lay claim to an unreliable wormhole. With no way to return home, they settled on the primitive planet and took advantage of a local myth predicting the arrival of "holy sages." Unhappy about the exploitation of the unsophisticated people, Janeway beams the Ferengi aboard Voyager. However, she reluctantly releases the pair after they persuade her that the sudden disappearance of Takar's "gods" would cause turmoil on the planet.
Resorting to trickery, Janeway sends Neelix to the planet disguised as a Ferengi to inform the pair that they're being recalled by their leader, the Grand Nagus. The plan backfires when the Ferengi decide they'd rather kill Neelix than give up their profits. To save himself, Neelix confesses his true identity. Once again, it appears the Ferengi have triumphed.
The crew has one more card up its sleeve. Drawing from mythic prophecies that the gods will leave on "wings of fire" following the arrival of a holy pilgrim, Neelix proclaims himself to be that pilgrim. The crew fires off three photon bursts to fulfill a line in the prophecy that says the gods will depart when three new stars appear in the sky.
Just as the crew's efforts to "attract" the wandering wormhole pay off, Voyager beams Kol and Arridor aboard. But before the ship can pass through it into the Alpha Quadrant, the Ferengi steal a shuttle and are pulled into the tunnel in space, destabilizing the phenomenon before Voyager can follow. Janeway and her crew saved the Takarians, but lost another chance to get home quickly.