Marvel fans think the series finale of Star Trek: The Next Generation may hold clues about to the plot of Avengers: Endgame.

There’s been speculation that the fourth Avengers film will be influenced by Star Trek: The Next Generation’s conclusion. The finale episode, “All Good Things,” involved Capt. Jean-Luc Picard (Patrick Stewart) working in three time periods to save the human race.

At least one Reddit user believes Avengers: Endgame will have a similar structure, with Tony Stark and the Avengers fighting Thanos across three eras of the Marvel Cinematic Universe.

“So, will the Avengers be battling Thanos (or whoever they will battle) simultaneously in different timelines? Could this be Cap America, Natasha and Ant-Man confronting Thanos in 2012 New York (remember, Thanos is behind New York's alien invasion), while Thor and the Guardians search for Thanos and the snapped Avengers in the present, and Iron-Man saves Pepper Potts and their kid in the future? Tony Stark could be confronting all the timelines simultaneously, alone from the Benatar, because that's the only thing left - or maybe because of a random anomaly in the timelines, Tony is left behind in space, alone. And this is how the film begins.”

Marvel Studios head Kevin Feige is a known Star Trek fans and he has compared Avengers: Endgame to “All Good Things” in the past, commenting on how the Next Gen gave its crew a satisfying conclusion without needing to kill anyone.

“People always will jump to that,” Feige said of a character’s story concluding with death. “That’s not necessarily what we’re talking about. I talk a lot, because I’m a big-ass nerd, about Star Trek: The Next Generation, ‘All Good Things.’ That to me is one of the best series finales ever. That wasn’t about death. Picard went and played poker with the crew, something he should have done a long time ago, right?”

While “All Good Things” is a beloved ending to a beloved series, Picard’s story did continue through four Star Trek movies after the show ended. Patrick Stewart will return to the role to tell more of Picard’s story in a new Star Trek series headed to CBS All Access in late 2019.

Do you think Avengers: Endgame will follow the structure of “All Good Things”? Let us know in the comments!

Avengers: Endgame opens in theaters on April 26th.

Upcoming Marvel Cinematic Universe movies include Captain Marvel on March 8th, and Spider-Man: Far From Home on July 5th.