"Trials and Tribble-ations" is the sixth episode of the fifth season of Star Trek: Deep Space Nine, and was created as a tribute to The Original Series for Star Trek's 30th anniversary.
Lucsly and Dulmur from Temporal Investigations arrive on DS9 to ask Sisko about a recent temporal incursion in which the USS Defiant went back in time. He tells them the full story may take some time -- no pun intended -- and begins to recount the events leading to the incursion.
The Cardassian government had expressed a desire to return one of the Bajoran Orbs, so the Defiant went to Cardassia Prime to retrieve it. Before leaving Cardassia Prime, Barry Waddle, an elderly, seemingly harmless, Human merchant who had been trapped on Cardassia when the Klingons attacked, also came aboard.
Halfway back to DS9, Chief O'Brien announces a massive surge in chroniton radiation around the ship as the entire bridge glows brightly and the viewscreen shows nothing but white noise. The ship drops out of warp and decloaks as someone activates the transporter. Sisko orders Lieutenant Commander Dax to get the ship back under cloak as O'Brien repairs the viewscreen. When the image is restored the crew is shocked to see the original USS Enterprise - James T. Kirk's ship - in orbit of Deep Space Station K-7...