Supergirl fans who also happen to like Jay and Silent Bob were in for a treat with the show's latest episode, "Deus Lex Machina." Not only was the episode the first that Supergirl herself, Melissa Benoist, directed, it also featured a cameo from Jason Mewes. It turns out that Mewes' cameo can be attributed to Benoist's time in Kevin Smith's Jay and Silent Bob Reboot, where she played a rebooted, gritty version of the superhero Chronic.

"When I worked on Jay and Silent Bob Reboot, Jason was talking about how much he loves the Arrowverse. He’s such a fan, and I know he’s been on The Flash before," Benoist informed TVLine. "I told him I’d love to put him in an episode of Supergirl, so when I got my script, I was like, 'Where can we do this?' So we eventually wrote that part in for him."

RELATED: Supergirl Reveals Who Really Killed Jeremiah Danvers

Mewes is a longtime partner of Smith, who has directed several Arrowverse episodes, including four on Supergirl and three episodes of The Flash. Although Mewes has appeared on The Flash, this cameo marks his first appearance on Supergirl. He appeared in a short scene as a farmer who sought solace from external dangers in a virtual reality landscape.

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: Melissa Benoist Was 'Terrified' to Sit in the Director's Chair