WARNING: This article contains major spoilers for "Deus Lex Machina," the latest episode of Supergirl.


Sharon Leal's Miss Martian isn't the only surprise guest star in "Dues Lex Machina."

The latest episode of Supergirl saw Lex Luthor devise a plan to pit Supergirl and Leviathan against each other in order to distract them from his own machinations. As a result, Leviathan triggered a potentially world-ending event. The episode cut to several different locations to show how the rest of the world reacted to this, with Jay and Silent Bob Strike Back star Jason Mews putting in a surprise appearance.

RELATED: Supergirl: Melissa Benoist Got Directing Advice From An Arrow Star

While Supergirl was in the Fortress of Solitude, a Morae sent by Leviathan slipped in and released the baby sun-eater to create chaos and fear. When it escaped, the sun-eater drew out Kara's natural solar power and took to the skies. It grew larger and larger as it approached the sun, allowing people all over the world to catch a glimpse of it. The scene jumped from Tokyo to New York to, finally, Mississippi, where Mewes appeared as an unnamed farmer.

When he caught sight of the sun-eater, he gasped, "Oh heaven to Betsy!" He then hopped off his tractor and checked his phone, which flashed a message: "Escape the event and find comfort in Obsidian North Platinum VR!" In response, he activated his Obsidian lenses, which transported him to a virtual reality landscape.

RELATED: Supergirl: Project Non Nocere Leads to An Unexpected Alliance

This proved Lex and Leviathan leader Gamemnae's theory correct. They speculated humanity would use the VR to escape life's traumas and tragedies, in much the same way Alex Danvers did in "Alex in Wonderland." Gamemnae plans to use this dependency to slaughter humanity. "The chaos of the disaster was working until [Supergirl] intervened, but now I know you were right about the global VR celebration," Lex said afterwards.

Mewes is a longtime partner of writer-director Kevin Smith. Smith, of course, has directed seven Arrowverse episodes: four on Supergirl and three on The Flash. Mewes himself is no stranger to the Arrowverse. He has appeared in two episodes of The Flash: in "The Runaway Dinosaur" as a humvee driver and in "Null and Annoyed" as a security guard. However, this is his Supergirl debut.

RELATED: Supergirl: Dreamer's Visions Will Have 'More Impact' as S5 Wraps Up

Notably, Supergirl herself Melissa Benoist recently appeared in a Smith project, as well. She played Reboot Chronic in Jay and Silent Bob Reboot, which starred Mewes and Smith as the title characters. Since "Deus Lex Machina" is Benoist's directorial debut, she may have called in a favor for her former co-star.

Airing Sundays at 9 p.m. ET/PT on The CW, Supergirl stars Melissa Benoist as Kara Danvers, David Harewood as Martian Manhunter and Chyler Leigh as Alex Danvers.

KEEP READING: Supergirl Season 5 Finale Is Being Rewritten Due to COVID-19 Shutdown