Heroes – and networks – will collide when The CW’s speedy superhero The Flash (Grant Gustin) crosses over to CBS’ “Supergirl” (starring Melissa Benoist) on March 28, for an episode titled “Worlds Finest.”

Both “Supergirl” and “The Flash” are executive produced by Greg Berlanti and Andrew Kreisberg through Warner Bros. Television and DC Entertainment, and The CW is jointly owned by Warner Bros. and CBS — which undoubtedly helped the episode jump some of the hurdles presented by an inter-network collaboration — but the crossover still required approval from WBTV boss Peter Roth, CBS topper Glenn Geller and CW head Mark Pedowitz before getting the greenlight.

Do the producers have super powers of persuasion? Perhaps.

“I honestly didn’t think it was possible between networks,” Benoist admits. “I remember Andrew Kreisberg telling me right before Grant and I presented at the Golden Globes, ‘we’re gonna just pitch the idea and see how they respond,’ and I remember thinking, ‘oh my god, this is going to happen. It has to! There’s no way in the world that people wouldn’t see how valuable that could be and how awesome it could be and how much the fans would love it.'”

She was right – Geller says he immediately saw the potential in the idea, especially because The Flash is capable of traveling to alternate universes without much narrative wrangling. “When Andrew and Greg said they wanted to do this, I got really excited, because no one knows their world better than them, and I always thought the idea of getting to cross over characters would be really fun,” he recalls. “What I love most about what they’ve accomplished is that it feels so organic — they wove it in through both story, mythology and the romantic arc of what’s going on in [Supergirl’s] life. In some ways, you couldn’t have told this story without The Flash.”

For Pedowitz, too, it was a no-brainer, even if Benoist’s Supergirl won’t be crossing over to “The Flash” this time around. “We were always open to it if the producers could make it work,” he says. “Comic books are the ultimate crossover – that’s the nature of what they’ve been since they’ve existed, characters moving back and forth. So from my perspective, this was a great thing for all the franchises.”

Variety was on set for the epic team-up, which saw Gustin’s Barry Allen and Benoist’s Kara Zor-El facing off against two of “Supergirl’s” most formidable foes, Livewire (Brit Morgan) and the newly revealed Silver Banshee (Italia Ricci) — aka Siobhan Smythe — who just discovered that she has a very specific skillset: sonic screams that can shatter concrete, and who knows what else. Variety photographer Michael Buckner went behind the scenes during a showdown between the dynamic duo and their villainous adversaries to bring you a series of exclusive photos that aren’t available anywhere else, offering a sneak peek into how the episode was made. Check them out, along with more intel from the set, in the gallery below.

Behind the Scenes of ‘The Flash’-‘Supergirl’ Crossover (EXCLUSIVE)

Both Gustin and Benoist are alums of Fox series “Glee” (which also counted “Supergirl” EP Ali Adler among its producers), although this is the first time the pair actually got a chance to exchange dialogue. “I think we technically shared a frame together once, but I don’t know that we ever even made eye contact,” Gustin laughs. “So it was a lot of fun to actually get to work with her.”

The feeling is mutual, says Benoist: “He’s so fun, it was really just a good time. I think both of us feel the same way about how we want a set to feel and what it means to lead a show the way that we have to, in the positions that we’re in. I think we have really similar outlooks and it was fun to swap stories about how hard this job can be, the difficulties and challenges, but also how rewarding it is. We can’t believe that both of us are doing what we’re doing.”

Few fans expected that a crossover would come in “Supergirl’s” first season, but Kreisberg admits, “We’re generally not fans of waiting to do anything. We had our first big crossover on ‘Flash’ in Episode 4 when we had Felicity [“Arrow” star Emily Bett Rickards] come, so I think it just felt like ‘Supergirl’ had its sea legs under it at this point in the year and it didn’t feel like a gimmick as much as ‘this could be really good.'”

Benoist says that Barry’s arrival comes at exactly the right time for Kara, who’s had a rough couple of weeks on “Supergirl,” thanks to her encounter with red kryptonite in the March 14 episode and the departure of sister Alex (Chyler Leigh) and mentor Hank (David Harewood) on a covert mission in last week’s installment.

“At the point that he shows up in National City, Kara’s kind of lost — this fallen hero, in a way. The city doesn’t trust her and she doesn’t know how to gain it back,” Benoist says. “She has no idea what to do next or how to redeem herself, and he comes in and they have this lovely relationship of helping each other and exchanging advice in what they’ve both experienced. There’s also a joy about it that she’s found someone like her, someone that has these powers and loves to help people. So I think there’s a really nice give and take between the two of them that instills more confidence in her when she really needs it.”

She needs all the help she can get in tackling Silver Banshee and Livewire, who are the perfect foils to face off with the new Super Friends, according to Kreisberg. “We’ve been slowly building towards Silver Banshee, introducing Siobhan and getting to know her over these last few episodes, and it’s kind of interesting because we haven’t really done that before on any of the shows, to introduce a character and slowly watch them turn into a villain — so that felt like we were challenging ourselves in doing something new and different,” he explains. “And we’ve been wanting to bring back Livewire ever since her first appearance, she really felt like the first villain we did that we got right. Once we came upon the idea of having two heroes in the episode, the idea of two villains quickly became a part of it.”

While Barry’s visit to “Supergirl” won’t have direct narrative repercussions on “The Flash,” Gustin says filming the crossover had an unintended effect on the Scarlet Speedster. “My favorite thing about it was we were shooting our Episode 18 of ‘Flash’ when I was simultaneously popping back and forth and doing ‘Supergirl’s’ Episode 18, and it’s the episode where Barry does disappear and go to this other Earth, so it coincided perfectly,” he recalls. “Barry’s kind of going through it, as he does towards the end of the season, and it’s heavy and he’s been kind of down and this event — which doesn’t read at all in ‘The Flash’ script as affecting Barry — because he’s gone and he’s on ‘Supergirl,’ when he comes back, it really ended up affecting my mood on that episode of ‘Flash’ and kind of changed the arc for Barry for the next couple episodes. It helped give him some confidence knowing he had this other ally out there. He just came back with a more positive outlook than I would’ve expected him to after breaking the dimensional barrier and disappearing for a full day.”

Since Barry originated on The CW’s “Arrow” before being spun off to headline his own series, crossovers have always been part of The Flash’s DNA; the shows share a universe (known as the “Arrowverse”) with another spinoff, “DC’s Legends of Tomorrow,” and all three are produced by Berlanti and Kreisberg through Berlanti Productions and WBTV, forming one interlinked continuity.

“The nice thing about The Flash is they can do this without impacting the overall mythology,” Pedowitz notes. “Because of his ability to time travel and break into different universes … Flash can go into any ‘verse because of the nature of his powers. When you can link them as needed for crossovers, it’s great.”

“It’s another stepping stone in what we all hope will be continuing to connect this whole universe and all these shows,” Gustin says of his visit to “Supergirl,” admitting that he hopes Benoist’s character can someday cross over with “The Flash,” “Arrow” and “Legends” in return.

“That would be so ideal, and I think that’s the goal, but I do not make those decisions — I just hope it happens,” he says.

The people making those decisions are a little more circumspect, but the door remains open. “We never want to say never to anything,” says Kreisberg. “I think if it’s successful and it works well and there’s an audience for it and people are excited by the prospect, we’re always game.”

Adds Geller, “We are open to all kinds of great stories. I’m happy to hear anything Greg and Andrew want to do, and I’m sure they know that. Who’s to say if there isn’t more of this in the future?”

Finding an organic way to tell such a story without it seeming like a stunt is the priority for all parties, according to Pedowitz: “If Greg and his team can make it work in a way that makes sense, we at The CW are open to it.”

“Supergirl” airs Mondays at 8 p.m. on CBS, “The Flash” airs Tuesdays at 8 p.m. on The CW.