Warning: SPOILERS for Star Trek: Lower Decks Season 2, Episode 1 - "Strange Energies".

Star Trek: Lower Decks season 2 opens with a hilarious parody of Star Trek: The Next Generation's classic "Chain of Command" two-parter. Of course, it's typical of Ensign Beckett Mariner (Tawny Newsome) that Starfleet's most dangerously insubordinate Lower Decker has turned how Captain Jean-Luc Picard (Patrick Stewart) was tortured by Cardassian Gul Madred (David Warner) into a holodeck workout program.

"Chain of Command" happened in season 6 of Star Trek: The Next Generation and, other than being assimilated by the Borg, it was the worst ordeal Captain Picard endured during his time commanding the USS Enterprise-D. Picard was captured by Cardassians during a covert mission and held prisoner by Gul Madred, who sadistically wanted to break the Starfleet Captain. Madred stripped Picard, and denied him food and sustenance, but his chief interest was gaslighting the Captain of the Enterprise. Madred stood behind four floodlights and insisted that Picard was seeing five lights. When the Enterprise was able to broker their Captain's release, Picard defiantly told Madred, "There are four lights!" in one of the most iconic moments of TNG. But when he was safe aboard the Enterprise, Picard confessed to Counselor Deanna Troi (Marina Sirtis) that he was so desperate for the torture to stop that he would have told Gul Madred anything. Worse, Jean-Luc really did begin to believe he saw five lights, which shows just how close Madred came to beating Picard.

Related: Star Trek Theory: Lower Decks' Mariner Served On The Enterprise With Riker

In Star Trek: Lower Decks' season 2 premiere, "Strange Energies", Mariner is similarly held prisoner by a female Cardassian before she turns the table and takes her interrogator hostage. Mariner then kidnaps the Cardassian and fights her way past armed guards to escape. Mariner also runs into Ensign Brad Boimler (Jack Quaid), who is also held prisoner, and he screams "They keep showing me lights!" in a direct wink to Picard's torture at Madred's hands. However, it doesn't take long for this crisis to be revealed as Mariner's holodeck program. Beckett not only used the "Chain of Command" scenario to work out physically against the Cardassians, but she simultaneously complained to holograms about her problems working alongside her mother, Captain Carol Freeman (Dawnn Lewis). But Mariner's therapy doesn't go her way since the Cardassian is not only unsympathetic, she's appalled that Mariner left the Boimler hologram behind and she tells Beckett, "You're an extremely bad person!"

Mariner Cardassian

How Mariner could possibly be so experienced and have so much knowledge about Starfleet history is a subject Star Trek: Lower Decks season 2 will tackle further. But Beckett's holodeck recreation of Picard's Cardassian torture is spot-on. Then again, since this is Mariner's workout program, it's designed for her to achieve victory, unlike Picard's real-life ordeal that he only just survived. It's also not the first time Beckett has used the holodeck to work out her issues with her mother; the Star Trek: Lower Decks season 1 episode "Crisis Point" was all about Mariner parodying the Star Trek movies while role-playing as Vindicta, the supervillain Captain Freeman must defeat.

"Chain of Command" was also referenced in Star Trek: Lower Decks season 1. In episode 7, "Much Ado About Boimler," Captain Freeman, Commander Jack Ransom (Jerry O'Connell), and Lieutenant Shaxs (Fred Tatasciore) had to leave the USS Cerritos to perform a Starfleet black ops mission, and they wore the same black outfits Picard, Worf (Michael Dorn), and Dr. Beverly Crusher (Gates McFadden) wore on TNG. Meanwhile, Mariner's best friend from Starfleet Academy, Captain Amina Ramsey (Toks Olagundoye), took temporary command of the Cerritos, although the crew feared it would be another "Captain Jellico (Ronny Cox) situation" since Jellico was the abrasive replacement for Picard as Captain of the Enterprise in "Chain of Command."

However, Mariner's co-opting the same scenario where Captain Picard got tortured as her personal therapy session on Star Trek: Lower Decks is extremely weird. Mariner has always been unlike any other Starfleet Officer and that includes regarding being captured and imprisoned by Cardassians as a cool scenario worth turning into a workout on the holodeck.

Next: Why Star Trek's Best Reboot Is Captain Will Riker

Star Trek: Lower Decks season 2 streams Thursdays on Paramount+.