Though Star Trek: Discovery is one of the most recent shows in the long-running franchise, it is actually set the second earliest in the in-universe Star Trek timeline. The first episode of Discovery is set in 2255, 10 years before the start of Star Trek: The Original Series, whose three seasons were set between 2265 and 2269.

This makes Discovery the second prequel in the Star Trek TV universe. Enterprise, which aired between 2001 and 2005 on UPN, was set even further back in the timeline than Discovery, with the show’s events spanning a decade between 2151 and 2161.

This TV timeline is a different one than seen in the recent Chris Pine-led Star Trek movies. The three movies Star Trek, Star Trek: Into Darkness and Star Trek Beyond were all set in what is known among fans as the “Kelvin-verse” or “Kelvin timeline.”

This happened after a Romulan mining ship got sucked back in time via a black hole and attacked the U.S.S. Kelvin, killing the father of James Kirk (played in the movies by Pine). This created two realities: The Kelvin timeline, where George Kirk died; and the Prime timeline where George Kirk lived to see his son captain the U.S.S. Enterprise.

Discovery and all the other Star Trek TV shows are set in this Prime timeline, with shows spanning the following in-series dates:

Star Trek: Enterprise (2151-2161)Star Trek: Discovery (2255)Star Trek: The Original Series (2265-2269)Star Trek: The Animated Series (2269-2270)Original Star Trek movies (2273-2293)Star Trek: The Next Generation (2364-2370)Star Trek: Deep Space Nine (2369-2375)Star Trek: Voyager (2371-2378)Star Trek: Lower Decks (2380)Star Trek: Picard (2399)

WARNING: The following contains major spoilers for the Season 2 finale of Star Trek: Discovery

Though in the episodes of the show currently airing on CBS are in the Prime timeline, at the end of Season 2 the show made the bold move to unshackle itself from canon and create its own future timeline.

In the finale, the Discovery ship heads into the void to help destroy an evil AI. This decision flings the crew far into the future (950 years, in fact, taking the show into the 33rd century) and into uncharted territory for the franchise.

Speaking about this to The Hollywood Reporter, Discovery showrunner Alex Kurtzman said, “We love playing within canon. It’s a delight and a privilege. It’s fun to explore nooks and crannies of the universe that people haven’t fully explored yet. That being said, we felt strongly that we wanted to give ourselves an entirely new energy for season three with a whole new set of problems. We’re farther than any Trek show has ever gone.”

Star Trek: Discovery Season 1 airs on Thursdays at 10 p.m. ET / 9 p.m. CT on CBS; Season 3 starts on October 15 on CBS All Access