Contains mild Star Trek Beyond spoilers

New sci-fi sequel Star Trek Beyond began its journey with some tragedy, as original Spock actor Leonard Nimoy (who also appeared in the 2009 and 2013 film reboots) passed away shortly before filming began.

Naturally, the iconic actor’s death added a sombre air to the film’s production, but the sadness was only just beginning for the cast and crew. A few months later, 27-year-old cast member Anton Yelchin (who played Pavel Chekov in the series) was killed in an accident involving his car, shocking his fans and drawing tributes from around the world.

Both deaths hang heavily over Star Trek Beyond in its finished form, which includes tributes to both men. But for the most part the film itself focuses on Nimoy, whose death was far enough before production for the writers to make it part of the film’s storyline (as opposed to Yelchin, who died after filming had completed).

During Star Trek Beyond it’s revealed that Nimoy’s older Spock (who travelled to the new films’ parallel timelines in 2009’s Star Trek) has also passed away, leading to sad reflection from his younger self (Zachary Quinto) and other crew members on his life and achievements.

Later, young Spock goes through Spock Prime’s effects, finding a photograph of the original Star Trek crew – William Shatner, George Takei, Nichelle Nichols etc – paying tribute to Nimoy’s “family” on the show as well as the 50th anniversary of the original series.

And finally, as the adventure ends and the crew reflect on what they’ve been through, Kirk calls a toast “to absent friends”, a callback to a toast given in 1984's Star Trek III: The Search for Spock after the "death" of Spock in 1982's Star Trek II: The Wrath of Khan (as well as a drink Kirk has in his late father's honour earlier in Beyond). The moment was undoubtedly meant to invoke Nimoy’s memory, but given Yelchin’s passing it gains an even greater poignancy.

More like this

Blink and you’ll miss it, but as Kirk raises his glass, the camera seems to linger on Yelchin for a second – a subtle goodbye to a young actor who producer JJ Abrams has recently announced won’t be replaced as Chekov for future films.

And when the movie finishes, both men are honoured, the screen reading “In loving memory of Leonard Nimoy” and “for Anton” before the credits start rolling. A fitting tribute to the loss of both old and new members of the Star Trek family.

Star Trek Beyond is in UK cinemas from Friday 22 July