Warning: SPOILERS for Star Trek: Lower Decks season 2, episode 8, "I, Excretus".

Captain James T. Kirk's (William Shatner) rescue of Spock (Leonard Nimoy) from the Genesis Planet in Star Trek III: The Search for Spock is homaged in Star Trek: Lower Decks, which also showed how easily Kirk's gambit could have failed. Directed by Leonard Nimoy, Star Trek III was the direct sequel to Star Trek II: The Wrath of Khan where Spock died saving the crew of the Starship Enterprise from a revenge plot by Khan Noonien Singh (Ricardo Montalbán).

Star Trek: Lower Decks season 2, episode 8, "I, Excretus," is jam-packed with odes to numerous Star Trek episodes and films. When a Pandronian drill instructor comes aboard the USS Cerritos to test its crew, Ensigns Beckett Mariner (Tawny Newsome), Brad Boimler (Jack Quaid), D'Vana Tendi (Noël  Welles), and Sam Rutherford (Eugene Cordero) are given temporary command assignments and placed in holodeck drills simulating the USS Enterprise's past encounters with the Borg, the Mirror Universe, the Psi 2000 virus in Star Trek: The Original Series' "The Naked Time," and the warp drive threatening to explode in Star Trek II that caused Spock's death. The Cerritos' crew then came together for a drill reenacting how Kirk stole the Enterprise from a Starbase to rescue Spock in Star Trek III, a gambit that the Starfleet Officers utterly failed. Because of their bickering, Mariner couldn't even lead the Cerritos out of space dock.

Related: Star Trek Changes What 'Red Shirts' Means (But It's Still A Joke)

As seen on Star Trek: Lower Decks, Captain Kirk's theft of the Enterprise in Star Trek III could have easily failed. Kirk and his loyal crew knew their gambit was a perilous act that warranted a court-martial (which came in the next film, Star Trek IV: The Voyage Home). But when Kirk learned that Spock had entrusted his Vulcan soul - his katra - to Dr. Leonard McCoy (DeForest Kelley), the Captain had no choice but to steal his starship and break multiple regulations to reunite Spock with his katra. With McCoy, Scotty (James Doohan), Uhura (Nichelle Nichols), Chekov (Walter Koenig), and Sulu (George Takei), Kirk's pirate crew hijacked the Starship Enterprise, which was due to be decommissioned, and piloted it out of space dock successfully in order to make their escape.

Star Trek 3 Lowe Decks

Kirk stealing the Enterprise is even more impressive considering his crew only numbered six. Scotty had to automate most of the Enterprise's systems so it could operate with a skeleton crew. In Star Trek III, Scotty truly lived up to his nickname "The Miracle Worker" because Kirk's operation couldn't have worked without his trusty Chief Engineer. Further, the threat of the USS Excelsior, which was the fastest and most powerful ship in Starfleet at the time, loomed since it was docked in the same space dock as the Enterprise. Scotty also had to sabotage the Excelsior and its transwarp drive so that it couldn't give chase as the Enterprise made its escape.

Contrasted to what the Enterprise crew accomplished in Star Trek III, the crew of the Cerritos bungling the Spock rescue mission from the get-go only made Kirk and his friends seem more heroic. After all, Mariner was leading a full crew with her own mother, Captain Carol Freeman (Dawnn Lewis) at the helm of the Cerritos. Yet mother and daughter allowed their rivalry to completely distract them, which caused the Cerritos to crash into the hangar bay doors. Naturally, they failed the simulation and the resurrected Spock would have died (again) on the exploding Genesis Planet if Mariner and Freeman led his rescue.

Star Trek: Lower Decks' homage also highlighted just how close Kirk and the Enterprise crew came to failing in Star Trek III. Butit also shows how dynamic Kirk's rescue operation to save Spock really was since Starfleet now includes their illegal theft of the Starship Enterprise as a holodeck training exercise in the 24th century even though it was illegal.

Next: Star Trek Argues Classic Trek Is Better Than Discovery & Picard Stories

Star Trek: Lower Decks streams Thursdays on Paramount+.