In Star Trek III: The Search for Spock, Captain James T. Kirk (William Shatner) gave a perfectly poignant toast that was later echoed in Star Trek Beyond. J.J. Abrams' Star Trek movies starring the rebooted Original Series cast set in the alternate Kelvin Timeline mined the original Star Trek for moments it could homage or retell differently. However, both Kirks' toasts were meant to have a similar meaning, although Star Trek Beyond's took on a greater significance.

There were a few purposeful parallels between Star Trek III and Star Trek Beyond, which was also third movie produced by J.J. Abrams, which made it a 'Star Trek III' in its own right. For example, both films saw the destruction of the Starship Enterprise. In The Search for Spock, Admiral Kirk blew up his beloved starship to keep it from falling into Klingon hands. In Star Trek Beyond, the Enterprise was annihilated by the swarm of ships controlled by Krall (Idris Elba). Meanwhile, Star Trek Beyond also nodded to Star Trek II: The Wrath of Khan by setting its beginning during Captain Kirk's (Chris Pine) birthday, and Pine's Kirk was almost as melancholy as Shatner's Kirk was after the death of Spock (Leonard Nimoy).

Related: Star Trek Perfectly Homages Kirk & Spock In Wrath Of Khan

The Meaning Behind Kirk's Perfect Spock Toasts

Kirk Toast Star Trek III

In both Star Trek III and Star Trek Beyond, the two Captain Kirks gather the Enterprise crew and toast, "To absent friends." Shatner's toast is a succinct and heartwarming tribute to their fallen comrade, Spock (Leonard Nimoy), who sacrificed his life to save the Enterprise and its crew in The Wrath of Khan. Kirk is deeply mourning his best friend, who only weeks prior gifted Jim with a copy of "A Tale of Two Cities" for his 50th birthday, hoping that it signified "the best of times." Kirk's toast would become the flashpoint of his quest to restore Spock back to life after he learns from Ambassador Sarek (Mark Lenard) that Spock's katra (his soul) had to be returned to Vulcan, and Spock had placed it in Dr. Leonard McCoy's (DeForest Kelley) mind.

Star Trek Beyond's toast was originally meant as a tribute to the late Leonard Nimoy, who died in February 2015 prior to the film's production. Nimoy had appeared as Ambassador Spock (or Spock Prime) in Star Trek 2009 and Star Trek Into Darkness, but in Star Trek Beyond, the younger Spock (Zachary Quinto) was informed of the elder Vulcan's death and received a box of his few possessions, including a photograph of the crew of his Prime Timeline Starship Enterprise. Thus, both toasts "To absent friends" were intended to honor the lives of Spock and Leonard Nimoy.

Anton Yelchin's Death Made Star Trek Beyond's Toast More Poignant

Anton Yelchin as Chekov in Star Trek Beyond

However, Star Trek Beyond's "To absent friends" toast took on an even more poignant significance because of Anton Yelchin's death. Just weeks before Star Trek Beyond's premiere, Yelchin suddenly lost his life in a tragic automobile accident. Yelchin completed his role in Star Trek Beyond, and he appears in the film as Pavel Chekov, which became one of his final performances. Star Trek Beyond subtly honored Yelchin by making Kirk's "To absent friends" toast also about the young actor, as the camera deftly pans to Chekov during the scene to let the audience know Anton Yelchin is being honored as well. Like Leonard Nimoy, Anton Yelchin is also a beloved member of the Star Trek family, and it's heartwarming that Star Trek Beyond ends with a poignant tribute to them both.

More: Nemesis Broke The Star Trek Movie Curse (& Abrams Reset It)