Sisko and Lieutenant Jadzia Dax ( Terry Farrell ) board the Enterprise but can find no trace of a bomb . They travel to K7 , and scans indicate that the bomb is in the grain storage compartments . They enter the compartments and discover that the poisoned grain have all been eaten by tribbles , who are now all dead . Suddenly Captain Kirk open the compartment and is covered in falling tribbles . Dax and Sisko find the bomb before it can kill Kirk and the Defiant transport it into space where it explode . The crew of the Defiant use the Bajoran Orb to travel back to the present time , and Sisko finishes explaining the situation to the Temporal Agents . The episode end with Quark ( Armin Shimerman ) in his bar on Deep Space Nine 's promenade , with numerous tribbles around him .