Time-travel existed in science-fiction long before Star Trek came along. However, no TV franchise has used it so often and in so many different ways. Every single Trek series has had at least a dozen episodes involving time-travel and all of them do their best to use it well. True, a few fall apart under the weight of trying to handle complex ideas of bouncing around time, alternate futures and trying to fix things in the end. But when it’s done right, it can be terrific. The movies have even done a great job with them as evidenced by The Voyage Home and First Contact. Yet even on TV, the writers are experts using time-travel pretty well and in a variety of ways. At first, it was rare, but by the time of DS9, it was so common that Starfleet had rules for time journeys and even a division to investigate such incidents.

Some tales toy with the idea of "fixing" the past while others push the theory that the time trip was always supposed to happen, suggesting the crew is just fulfilling destiny. Behind the scenes, it gives the producers a chance to take risks with characters that were previously taken off the show, giving them an opportunity to come back. And of course, it’s also fun to see the series use their time-travel set pieces to show off some intriguing futures. The best episodes show the ramifications of how one small change can lead to huge transformations in history. There are a lot of choices, but here are the best of the best. Here’s how the 20 best Star Trek time-travel stories rank and prove the franchise is able to pull the concept off better than any others.

20 TIME’S ARROW (TNG)

Bridging the fifth and sixth seasons of TNG, this episode opens with a true mystery: Data’s severed head found in a cavern under San Francisco that’s been sealed off for 500 years. Obviously, the crew is trying to figure out what could have happened as a race of shapeshifting aliens have found a portal to 1893. Data enters it, using his skills to win money at poker and be able to get around. This episode reveals that bartender Guinan has been around for centuries when Data runs into her younger self. He also meets Mark Twain who suspects something is up. The rest of the crew follow and Picard is trapped in the past while Twain follows the crew to the future.

The idea of Mark Twain on the Enterprise is crazy but it works thanks to the great performance of Jerry Hardin. He shows terrific humor with Clemens amazed at this future. An intriguing bit is that Guinan remembers how Picard saved her life in 1893 and thus always knew this time-travel trip was going to happen. The fight with the aliens is good but it’s fun how the story mixes in some time-travel aspects for a very underrated TNG adventure.

19 RELATIVITY (VOYAGER)

Voyager had already introduced the idea that in the 29th century, Starfleet has their own time-travel corps headed by Captain Braxton. When they find Voyager has been destroyed by a bomb and changing history, Braxton has to stop it. He plucks Seven of Nine out of time and sends her back to find the bomb when Voyager was about to first take off. Things go wrong so Braxton has to get another Seven to carry out the mission. It turns out a future version of Braxton has gone dark and planted the bomb and they need the help of not just Seven but Janeway to stop it.

It’s a wild story that could have become a mess. But it actually works out thanks to some fun humor from Janeway and Seven dealing with all this. It even addresses the issues of how changing history just causes more messes down the line. The way Seven works with her younger self is fun and also funny how the 29th century crew moans over how the 24th century guys just go out of their way to create messes they have to clean up. No matter what period, time-travel can be chaotic for the Star Trek universe.

18 TOMORROW IS YESTERDAY (TOS)

This was the first-ever Trek time-travel episode which automatically makes it rather important. Thanks to a “black star,” the Enterprise is thrown back in time to 1960s Earth. An Air Force pilot almost literally runs into them and is beamed aboard. At first, Kirk thinks he has to stay with them because of his knowledge of the future. It turns out the pilot is supposed to have a son who plays a major role in the first mission to Saturn so he has to be returned. Kirk and Sulu then have to break into a military base to eliminate some evidence only to run into trouble.

It’s interesting seeing the crew as thrown by the time-travel as anyone else. Mixing the “present” of the ‘60s with the Enterprise crew is pretty fun as Kirk has a grand time playing around with the military police of the era. It does end with a “this never happened” bit for the guys in the present while setting the bar for every other Trek time-travel story to follow.

The “travel” part of this tale is a truly original concept. Voyager is hit by some energies while flying over a planet. They realize that for every minute that passes for them, a year goes by on the planet. We thus see a primitive world that worships Voyager as a chariot of the gods. As the crew observes the planet, we check in to see how society has evolved over the centuries for its inhabitants. They move from superstition to science as they realize it’s a starship over them. When the Doctor briefly checks the planet out (a second to Voyager, three years for him), he informs the crew that Voyager is a major part of the planet’s culture.

It builds to the race able to send a manned vessel with an astronaut (Daniel Dae Kim) astounded to finally meet the “Sky People.” He’s able to stop an extremist group from launching an attack on Voyager. The crew then meets the alien, now a few years older as the planet has developed space travel of their own. Voyager eventually is able to leave, amazed at how a simple five hour flight basically transformed thousands of years of a planet.

16 SHATTERED (VOYAGER)

Knowing they were entering their final season, the Voyager producers did a fun episode that paid tribute to the show’s past. Chakotay takes a blast of temporal energy and wakes up in sickbay where the Doctor doesn’t have his holographic emitter. Chakotay heads to the bridge where Janeway acts like he’s still a member of the Maquis. Somehow, the ship has become splintered in various time periods and Chakotay is the only one who can cross them. He drags Janeway with him and she’s naturally thrown to see what awaits the ship in the future.

It’s a fun story as we see some old faces like Seska and Torres both as her current version and the angry Maquis she started off as. Chakotay gets hit with this himself when he runs into a now-grown Naomi Wildman who’s a member of the ship’s crew. It’s a great way for the series to show the struggles Voyager has gone through as this Janeway realizes the task ahead of her. Plus, the idea of a single ship with so many time periods is clever even by Star Trek standards.

15 STORM FRONT (ENT)

The third season finale of Enterprise ended on a wild note as in World War II, a figure in an SS uniform turns out to be a grey-skinned alien. This leads into the two-part fourth season premiere which kicked off in wild fashion. It brings up the arc of a “Temporal Cold War” raging with one faction aiding an alien race called the Na’Khul in joining the Axis in World War II. The Enterprise is brought to 1944 where Archer is captured. He finds himself in a New York where the Germans are in control and have basically won the war.

Archer joins a resistance movement against the Nazis and their Na’Khul allies. A huge battle takes place as the Enterprise faces World War II fighters with alien weaponry. The sight of alien Nazis is enough to intrigue you while the series sells the horror of a Nazi-occupied United States. It does end with things set right and the Temporal stuff handled but the intriguing storyline is a daring time-travel adventure.

14 TIMELESS (VOYAGER)

Voyager loved to play with the idea of the crew getting home -- of course, with strings attached. This episode uses that trope as an aged Chakotay and Harry Kim are shown on an icy planet. They find Voyager buried under the ice with most of the crew aboard. Fifteen years earlier, the duo were on the Delta Flyer as Voyager tested a new slipstream engine intended to get them back home. Something went wrong so while Chakotay and Harry made it to Earth, Voyager and its crew were lost. Long consumed with guilt over surviving when the others didn’t, the duo have decided to use Seven’s technology to send a warning into the past.

Starfleet doesn’t like them messing with time and Captain Geordi LaForge is sent to bring the two in. It’s a good idea as Harry fails in his first attempt at a warning and has to figure the right way to fix things. There’s also how he leaves a message for his younger self to not give up. The Geordi cameo alone makes this episode worth the time to check out.

13 VISIONARY (DS9)

Chief O’Brien gets a great showcase in this intriguing time-travel story. After taking a blast of plasma, O’Brien sees himself arguing with Quark. At first he writes it off as a side effect…until he has that very talk and he and Quark see the other O’Brien staring at them. O’Brien is experiencing “time shifts” to hours or days in the future. At first, they’re mild like finding himself in a bar brawl between Klingons and Romulans. It gets more serious when O’Brien sees his own death…twice.

A major moment is O’Brien watching as the entire station is destroyed. He has to find a way to harness these shifts, even if it means endangering his life. He contacts his future self (a great moment has them both complaining “I hate temporal mechanics”) as they realize DS9 is about to come under attack. One O’Brien doesn’t make it as the other has to stop this disaster. It’s a short tale but still interesting in how the crew utilize a time-skipping O’Brien well to save the day.

12 ENDGAME (VOYAGER)

After seven seasons, Voyager brought about a conclusion fans weren’t quite ready for. It actually opens ten years after the Voyager crew finally returns to Earth after over two decades lost. Janeway is an admiral, Harry a captain, Tom and B’Ellana have a family and the Doctor is successful as well. However, Janeway is haunted by how Tuvok is in a mental hospital and Chakotay and Seven were lost during their journey. She thus decides to break the Temporal Prime Directive by going back in time and ensuring Voyager gets home much earlier.

Kate Mulgrew does a great job playing the two Janeways with the present one thrown by her colder, older self. This leads to a conflict with the Borg and a thrilling climax where one of the Janeways has to make a very difficult choice. It ends up bringing Voyager back to Earth in the shot fans had waited years for. It was tricky mixing a big time-travel story into their finale but the producers pulled it off to bring this voyage to a fine conclusion.

11 LITTLE GREEN MEN (DS9)

Feregni + time-travel = comedy gold. Quark, Rom and Nog are headed to Earth in a shuttle Quark just won. Thanks to the usual Trek technobabble accident, the shuttle is knocked off course and crashes in…1947 Roswell, New Mexico. Yep, the three Ferengi were the aliens that would inspire countless conspiracy theories. Naturally, Quark could care less about preserving the timeline and instead sees major ways to make a fortune using his knowledge of the future. There’s beautiful comedy as the humans act out wild ways to communicate with the aliens and the Ferengi are just baffled.

Of course, it doesn’t take long for Quark’s big mouth to get them in trouble as he gives the impression the Ferengi are going to invade Earth. This leads to the military planning to dissect the prisoners. Fortunately, Odo had stowed away on the ship and helps them find a way back home. The joy is watching the Ferengi play with these foolish Earthlings as the episode brought a much needed dose of levity to DS9.

10 CAUSE AND EFFECT (TNG)

kelsey-grammer-star-trek

The opening is guaranteed to pull you in. The Enterprise is shaking hard, alarms blaring, damage reports coming in and Picard ordering to abandon ship just before it explodes. The first act shows the crew finding a strange anomaly where another starship exits. They end up crashing and causing the destruction again. We then see it happen once more. The Enterprise is caught in a time loop that forces them to replay the destruction over and over. Somehow, the crew become aware of what’s happening and have to figure out a way to break the loop.

It’s quite well done with the wonderful touch of how, in each loop, no scene is filmed in exactly the same way. The idea of how the crew realize what’s going on and find ways to leave clues for the next loop is pretty clever. It ends with a good solution and a surprise cameo from Kelsey Grammer as the captain of the other ship. Before Groundhog Day, this was a great example of the “time loop” done right.

9 PAST TENSE (DS9)

The best Star Trek stories offer some great social commentary amid the sci-fi action. This two-part DS9 tale pulls that off nicely. Trying to transport to Starfleet headquarters, Sisko, Bashir and Dax are rerouted by a temporal shift to 2024 San Francisco. Dax is lucky as she’s found by a rich media mogul. Sisko and Bashir are tossed into the Sanctuary, a district where the homeless, mentally ill and others society ignores are pushed together. Sisko realizes they’re on the eve of the “Bell Riots,” a massive uprising. Bashir is upset that Starfleet’s temporal rules mean they can’t do anything to stop hundreds of deaths. Sisko informs him how a man named Gabriel Bell will sacrifice himself to save hostages and become a symbol that will inspire mass social improvements.

In an altercation, a passerby is killed helping Sisko and Bashir and they’re horrified to find it was Bell. The Defiant crew suddenly discover they’re all that’s left of the Federation. Sisko realizes there’s only one thing to do. He and Bashir get to the building the hostages are held in where Sisko claims to be Bell. The group must make sure history unfolds as it should while Sisko avoids Bell’s fate. It still works as a good time-travel story and some sharp commentary on the treatment of humanity's most marginalized.

8 YEAR OF HELL (VOYAGER)

It’s amazing it took so long for Star Trek to do the idea of time used as a weapon. Annorax (Kurtwood Smith) is a scientist who has developed a ship that can alter history with an energy blast. He intends to make his Krenim race stronger by using the ship to wipe their enemies out of existence. Voyager feels this first hand when an alien race they’d been meeting vanishes without a trace. But when he eliminated one race, Annorax discovered too late that without them, a plague ravaged millions of his own people, including his wife. Annorax is now out to “correct” the mistake but every “fix” just makes thing worse.

Voyager is soon put through a terrible ordeal, constantly under attack by enemy forces and battered to the limit. Several characters fall and others are crippled as the ship tries to fix these mistakes. Eventually, it’s all set right but it showed a very tough time for the crew. Like many others before him, Annorax had to learn the hard way that “correcting” history rarely works out very well.

7 TAPESTRY (TNG)

Everyone wishes they could go back in time and fix a past mistake. But as this intriguing episode shows, that’s not always a good thing. After a near-fatal blast that damages his artificial heart, Picard is met in the afterlife by Q. He gives Picard a chance to go back to his days in the academy and prevent himself from being stabbed in a bar brawl which necessitated a new heart. Picard does so, romancing a fellow cadet while stopping a friend from a prank. However, he ends up alienating both even as he prevents his stabbing.

Picard finds himself in the present where he’s suddenly a junior-grade lieutenant on the Enterprise. It seems without that stabbing, Picard never faced his own mortality which never gave him the confidence to take command; his entire career is working as a low-level researcher. Q does put things right yet Picard notes how “pulling on one strand just undoes the tapestry of your life” and the past should just be left in the past.

6 THE VISITOR (DS9)

This is one of the most emotional episodes in the history of Star Trek. In the future, an aged Jake Sisko (Tony Todd) is visited by a young fan of his writing. He shares the story of how decades before, an accident seemed to claim the life of Commander Sisko. Without Sisko around, things fell apart as the Federation and the Klingons went to war, DS9 and Bajor were pretty much abandoned and the crew drifted apart. However, Jake found he could communicate with his father at times and is obsessed with finding a way to save him.

The future crew is interesting to see as well as Sisko thrown to find Jake has basically thrown his life away trying to save his dad. Todd’s performance is magnificent, selling Jake’s guilt and loss and how badly he needs his father. He even makes the ultimate sacrifice to get Sisko back to the time of the accident. Sisko is able to avoid it and appreciates the memory of the grown man his son had become. It’s a beautiful episode that shows how the bond of a father and son can overcome time itself.

5 ALL GOOD THINGS (TNG)

Picard as an old man in ALL GOOD THINGS

After seven years, TNG ended with a storyline meant to bring things full circle. In the future, the crew has gone its separate ways. Picard is now a semi-retired ambassador tending to his family vineyard, Data is teaching at Cambridge, Worf is a Klingon governor and Riker an admiral. Picard finds himself jumping through time, from the future to the present to the events of the very first episode. The culprit is, of course, Q who’s still putting humanity “on trial.” This involves a dark anomaly that threatens the universe.

There is a thrill as Picard and the crew work over several different time periods to try and fix things. We get the return of old faces like Tasha Yar and the future characters are presented rather well. The real push at the end to save the day is good but better is the wonderful final scene of Picard joining the crew for their "final" poker game. It was a love letter to the fans and one of the best finales to any TV series ever.

4 YESTERYEAR (ANIMATED SERIES)

Even many Trek fans will forget the 1970s animated series boasting the voices of the original cast. Which is a shame, as it could offer some gems. This is probably the best of them all; only its second episode. Kirk and Spock had been conducting research on the Guardian of Forever, returning to the Enterprise only to find no one knows Spock and there’s an Andorian first officer. Records show Spock died at the age of seven during a Vulcan ritual and they surmise something must have gone wrong. They travel through the Guardian with Spock posing as a distant cousin to interact with his younger self.

Mark Lenard voices Spock’s father, Sarek, with Spock naturally intrigued meeting his younger dad. Spock realizes that he’s come at a key time as his younger self faces the loss of a beloved pet. Spock helps him see the Vulcan way of logic which will end up saving his life and paving the way to his future. Even in animated form, Leonard Nimoy’s performance is top notch to pull you into the storyline. It’s all set right and shows how this animated series could give the live-action TOS a run for its money.

3 TRIALS AND TRIBBLE-ATIONS (DS9)

To celebrate the 30th anniversary of Trek, the DS9 producers could have gone for an epic story. Instead, they went for pure comedy by putting the DS9 crew in the middle of the classic TOS episode, “The Trouble With Tribbles.” Darvin, the Klingon spy from that episode, tries to redeem himself by using an Orb to go back in time and kill Captain Kirk. The Defiant crew are dragged along for the ride and have to stop him while not upsetting the timeline. This leads to bits like Dax in the classic “mini-skirt” uniform and Worf grousing over the tribbles.

The effects are top notch in integrating the DS9 crew into the episode such as how O’Brien is among those taking part in a bar brawl. There’s also the fun explanation that the reason tribbles keep hitting Kirk is Sisko and Dax tossing them out of a storage locker. We even get the great sight of Sisko meeting Kirk. The final shot is the topper to a terrific storyline that shows DS9 could pull off stellar comedy at times.

2 YESTERDAY’S ENTERPRISE (TNG)

Picard on the Bridge in YESTERDAY'S ENTERPRISE

The opening is one of the best in TNG’s history. The Enterprise-D is checking out a strange anomaly when a ship exits. Instantly, things change as the Enterprise bridge is darker, the crew more military-minded and the long-dead Tasha Yar is alive and well. Only Guinan is able to sense something is wrong. The other ship is the Enterprise-C which in the original timeline, sacrificed itself to save a Klingon base from a Romulan attack. The Klingons were so impressed by this show of honor that it paved the way to make peace with the Federation. But with the Enteprise-C vanishing during the battle, the war has continued and it’s going bad for the Federation.

Picard finds himself with the tough choice of asking the Enterprise-C crew to go back, knowing they’re facing their deaths. This tougher Enterprise is intriguing with the crew made harder by their long war. Meanwhile, Tasha gets a hint over her death in the original timeline and makes a bold choice of her own. The final scene is a major battle but it works out in the end as the timeline is set right. But it works as a genius time-travel storyline to show a darker TNG future.

1 THE CITY ON THE EDGE OF FOREVER (TOS)

It’s not just the best time-travel episode of Trek but perhaps the best Trek episode of all time. After being driven into a frenzy by a drug, McCoy beams to a planet that contains the Guardian of Forever, a sentient time portal. McCoy jumps into it and the other crew members find the Enterprise no longer exists. Kirk and Spock follow McCoy to 1930 where they have to fit in during the Great Depression. They befriend Edith Keller (Joan Collins), a young woman fighting for peace. It doesn’t take long for her to win Kirk’s heart more than any woman before or since.

It’s here the tragic twist comes in. Spock discovers Edith is meant to be run over by a truck but McCoy stopped it. If she lives, her peaceful crusade will prevent the U.S. from entering World War II long enough for the Nazis to conquer the world. Thus, in a heartbreaking moment, Kirk has to let his love die to save the future. It’s a terrific scene with William Shatner selling Kirk’s agony while making the ultimate sacrifice. A genius story that even non-Trek fans can love; it still resonates after all this time.