Star Trek has a strong tie to the X-Men, thanks to Patrick Stewart’s portrayal of both Professor Charles Xavier in the X-Men film franchise and Captain Jean-Luc Picard in Star Trek: The Next Generation and Star Trek: Picard. But long before this cinematic connection was established, the X-Men not only met the crew of the Enterprise in the comics – they learned mutant-powered doppelgangers of Starfleet officers exist in their universe!

The discovery takes place in Star Trek The Next Generation/X-Men: Second Contact, a comic book published by Marvel and Paramount Comics. The comic functions as a sequel to a previous crossover comic, Star Trek/X-Men, which saw the X-Men travel to Star Trek’s future to help Captain Kirk stop his mutated friend Gary Mitchell, who had merged with the X-Men villain Proteus. The X-Men’s next encounter with Starfleet, however, would not be with Kirk and Spock but Captain Picard and the crew of the Enterprise-E.

Related: Marvel’s X-Men Are FINALLY Getting Serious About Diversity

The X-Men Meet Star Trek’s Next Generation

Data Wolverine Colossus X-Men Star Trek

The story takes place right after the conclusion of Star Trek: First Contact, the Enterprise-E creates a time displacement field to return home after their battle against the Borg in the year 2063. The field malfunctions, however, and when they emerge, they discover they’re in the 1990s – and in an alternate universe orbiting Earth. Needing repairs, they scan the planet, and discover Shi’ar technology on the surface (indicating that the X-Men’s alien Shi’ar race also exists in the Star Trek universe).

Beaming down, the crew sneaks into the X-Mansion where multiple X-Men, including Nightcrawler, Archangel, Wolverine, Storm, Kitty Pryde, Colossus, and Banshee, have gathered for a social call. As Data, Geordi LaForge, and Counselor Troi attempt to raid the mansion for the tech they need, they’re stopped by Wolverine and Colossus. After a brief fight (where Data shows he’s easily able to withstand Colossus’ blows) the teams call a truce thanks to Wolverine, of all people, who recognizes the crew as Starfleet due to his earlier adventure with Captain Kirk.

Comparing notes, the Enterprise crew and the X-Men discover the Enterprise-E caused a rift in the space/time continuum. The threat is clarified by Marvel’s time traveling despot Kang who arrives to claim that the Enterprise’s arrival has caused anomalies in both the Star Trek and X-Men timelines to emerge. Warning that the anomalies could cause all of reality to collapse, Kang charges both Picard’s crew and the X-Men to travel to different points in their histories to destroy the anomalies.

This leads to mixed teams of both groups to travel to two significant events in each other’s timelines – the X-Men’s Days of Future Past and Starfleet’s battle against the Borg at Wolf 359. Once there, however, the teams discover the “anomalies” Kang sent them to destroy are doppelgangers of old friends. At Wolf 359, the X-Men discover an alternate version of John Proudstar (aka Thunderbird, a mutant who died shortly after joining the X-Men) is serving aboard a Starfleet vessel as Lieutenant Proudstar. Meanwhile, in the post-apocalyptic future of Days of Future Past, Picard’s crew meets Tasha Yar, their former Chief of Security who died while serving aboard the Enterprise. Here, Tasha is a mutant with psychic abilities who takes the place Rachel Grey (aka Phoenix) – and is trying to send the mind of an adult Kate Pryde back in time to warn the X-Men about their grim future.

Both teams discover that Kang duped them – and that the “anomalies” are there to fix the timestream. Lieutenant Proudstar dies saving Benjamin Sisko from the Borg (allowing him to go on and become the Emissary of the Prophets in Star Trek: Deep Space Nine). Tasha, however, is badly injured in a Sentinel attack before she can fulfill her mission. With the help of Counselor Troi, Tasha manages to send Kate back in time before she succumbs to her wounds and dies. Having foiled Kang’s plan to control the time stream, the X-Men help Picard and his crew with repairs and send them home.

Surprisingly, the story doesn’t end there, as Star Trek’s Next Generation crew and the X-Men would team up again in the prose novel Star Trek: The Next Generation/X-Men: Planet X (1998) which saw both teams deal with a planet in the Star Trek universe that begins spawning mutants. The novel also makes a passing reference to how much Captain Picard resembles Professor Charles Xavier, years before Patrick Stewart would play Xavier in X-Men (2000). It’s a prophetic observation… or possibly an indication that the Star Trek universe may contain more doppelgangers of the X-Men – and possibly vice versa.

Next: There Are 2 More Unannounced Star Trek TV Shows In The Works After Picard