"Trials and Tribble-ations" is the 104th episode of the American science fiction television series Star Trek: Deep Space Nine, the sixth episode of the fifth season. It was written as a tribute to the original series of Star Trek, in the year of that show's 30th anniversary; sister series Voyager also produced a tribute episode, "Flashback".
Set in the 24th century, Star Trek: Deep Space Nine follows the adventures of the crew of the space station Deep Space Nine, near the planet Bajor, as the Bajorans recover from a brutal, decades-long occupation by the imperialistic Cardassians. In this episode, Captain Benjamin Sisko (Avery Brooks) and the crew aboard the USS Defiant are taken back in time to the events of the Original Series episode "The Trouble with Tribbles", and must work to prevent the assassination of Captain James T. Kirk (William Shatner) of the USS Enterprise by a Klingon using a booby-trapped tribble.
The idea for the episode was suggested by René Echevarria, and Ronald D. Moore suggested the link to "The Trouble with Tribbles". The two were credited for their work on the teleplay, with the story credit going to Ira Steven Behr, Hans Beimler and Robert Hewitt Wolfe. The episode features the Deep Space Nine actors digitally inserted into footage from the Original Series. Actor Charlie Brill, who played the role of Arne Darvin in "The Trouble With Tribbles", returned to reprise the role as an older Darvin.
"Trials and Tribble-ations" was warmly received by critics with praise directed at the nostalgia and level of detail seen on screen. It was the most watched episode of the fifth season. "Trials and Tribble-ations" was nominated in three Primetime Emmy Award categories and for the Hugo Award for Best Dramatic Presentation, but did not win any awards. It was released on VHS initially alongside "The Trouble with Tribbles", and later as part of the normal release schedule. It was subsequently released as part of the season five DVD set.
Plot
The crew of Deep Space Nine are on the USS Defiant, returning to Bajor with the sacred Bajoran Orb of Time, which is being returned by the Cardassian government after being stolen during the occupation. They pick up a hitchhiker, a human called Barry Waddle. Suddenly, the ship finds itself more than one hundred years in the past and approximately 200 light years away from its previous location, near Deep Space Station K7 and the USS Enterprise. They discover that the hitchhiker was Arne Darvin, a Klingon agent disguised as a human who was caught by Captain Kirk on K7 after poisoning a shipment of grain.
Fearing that Darvin used the Orb of Time to alter the past to prevent his capture, the crew dress in period uniforms and investigate the Enterprise and K7. The ship and station are infested with tribbles, small furry creatures that reproduce rapidly. They attempt to interact with history as little as possible while investigating Darvin, but Dr. Bashir, Chief O'Brien, Worf and Odo get involved in a bar brawl between the Enterprise crew and a number of Klingons on shore leave. During the brawl, Worf and Odo spot Darvin and bring him back to the Defiant. There, Darvin gloats that he has planted a bomb in a tribble to kill Kirk.
Captain Sisko and Lieutenant Commander Dax infiltrate the Enterprise bridge to scan for the bomb, and confirm it is not on the Enterprise. The rapid breeding of the tribbles makes searching for the bomb on K7 impractical, so they opt to shadow Kirk. They overhear him discussing the tribble infestation, and deduce that the bomb is in the grain storage compartments. They enter the compartments and begin scanning the tribbles, many of which are dead from eating the poisoned grain. Captain Kirk opens the compartment and is covered in falling tribbles. Dax and Sisko find the bomb among the tribbles still in the compartment and the Defiant transports it into space, where it explodes. The crew of the Defiant use the Bajoran Orb to travel back to their time.
Later, agents from the Department of Temporal Investigations arrive at Deep Space Nine to question Sisko about the incident. After interviewing Sisko, the agents leave, expressing optimism that the crew's actions have not seriously altered history. Once they are gone, Odo summons Sisko to DS9'''s Promenade, which is now covered in tribbles.