There’s a scene in Spider-Man: Far From Home where Tom Holland and Jake Gyllenhaal shake hands. (We promise — no spoilers lie ahead!) It’s not a particularly exciting scene, just a brief moment where Holland’s webslinger and Gyllenhaal’s magician Mysterio meet for the first time and greet each other. For a continent-hopping superhero movie that includes aerial acrobatics, visual effects wizardry, and action set pieces filmed across several European countries, shooting a handshake should’ve been easy.

Should’ve. In reality, that maneuver took dozens of takes — because every time Holland and Gyllenhaal would clasp hands and lock eyes, they’d collapse into giggles. “Tom was tired, and he just couldn’t keep it together,” Gyllenhaal explains. “Every single time we would shake hands, he would start laughing, so I’d start laughing, and we both couldn’t stop laughing. That went on for about 30 minutes. It was about 45 to 50 takes, and it was a disaster.”

“I don’t even remember what was funny about it,” Holland adds. “There was something about the scene where Jake and I just could not keep a straight face.”

Holland and Gyllenhaal had never worked together before Far From Home (out July 2), but by the time this film — the Marvel Cinematic Universe’s 23rd — wrapped, they’d become fast friends, the kind of friends who can send each other into hysterics simply by making eye contact. When they reunited for EW in May, the pair started ribbing each other about their wardrobe choices almost as soon as they arrived. At one point during the photo shoot, Holland inched closer and closer to Gyllenhaal’s face as they gazed into each other’s eyes and almost touched lips — before they both broke (yet again).

“They really just got along almost immediately. They would always crack each other up during takes, and that was the only downside,” director Jon Watts says of his stars with a sigh. “We’d get halfway through an amazing take and then they’d make each other laugh, and we’d have to cut.”

Image zoom JUCO for EW

On the surface, Holland and Gyllenhaal don’t have much in common. Holland is a 23-year-old Brit whose charm and gymnastics experience make him seem like he was grown in a secret Marvel lab to be Spider-Man (a role he’s played in five MCU movies now). Gyllenhaal is a Los Angeles-born Oscar nominee who’s 15 years Holland’s elder, known for quirky characters ranging from the dramatic (Donnie Darko, Nightcrawler) to the downright unhinged (Okja, anyone?).

But they’re also both theater nerds who first catapulted to movie stardom as teenagers. (In fact, Gyllenhaal famously almost played Peter Parker himself, as he was at one point considered to replace Tobey Maguire in Sam Raimi’s Spider-Man 2.) They’ve long shared an admiration for each other’s careers — the duo first met a few years ago after a chance run-in at a restaurant, and when Gyllenhaal walked over to introduce himself, they both told each other that they’d love to work together someday.

That “someday” arrived sooner than they thought when Gyllenhaal was cast in Far From Home as Quentin Beck, a.k.a. Mysterio. Spider-Man and Mysterio have a long, hostile comics history, but the sequel to 2017’s Spider-Man: Homecoming positions Mysterio as more of an ally. This bubble-headed brother-in-arms arrives in Europe and helps Peter bring down a massive water monster, right as Peter is mourning the loss of his mentor Tony Stark (Robert Downey Jr.), who sacrificed himself to bring down Thanos in Avengers: Endgame.

Hero game recognizes game, and Parker and Beck immediately bond over the shared responsibility of being a costumed crusader. “Peter cares about a lot of different people, but particularly strangers that he doesn’t really know well that he shares common interests with,” Gyllenhaal says of their character dynamic. “I just love that two people could become so close so fast because of their history and just because of their own struggles as superheroes.”

As Watts puts it, if Tony Stark was like a cool dad to Peter, the bearded Quentin Beck is more like his “cool uncle” — trading quips, helping him battle mysterious forces called the Elementals, and offering him advice about talking to girls. Although…

“I probably should’ve said cool older brother because saying ‘uncle’ is such a hot-button word in Peter Parker’s universe,” Watts says. “He’s had some bad uncle experiences.”

For Holland, he drew inspiration for the mentor-mentee relationship from real life. “It’s always a bit nerve-wracking when you meet someone you look up to,” Holland says. “I was just really grateful when I met [Jake] and I found out he’s a lovely guy and a great dude.” Like Parker, who asks Beck for guidance on everything from heroism to romance, Holland has also found himself turning to Gyllenhaal for career pointers. “He’s definitely someone I feel comfortable calling to say, ‘Hey man, would you mind giving this script a read and letting me know what you think?’” Holland says.

Image zoom JUCO for EW

But the offers of advice went both ways. Even though Gyllenhaal has starred in big-budget movies before (like 2010’s Prince of Persia: The Sands of Time), Far From Home is his first foray into cape-and-tights superheroism. On his first day on set, the seasoned actor jammed into Mysterio’s costume and filmed a stunt where he leaps into the air off a massive platform. (“You get literally thrown into the Marvel universe,” he jokes.)

Between the stunts, the costume, and the pressure of being the new kid in a multi-billion-dollar franchise, Gyllenhaal says he found himself struggling to adjust in those early days. “You walk into a Marvel film, and it’s huge,” he explains. “They’re massive. In a way, you’re expected to just jump on the train and get going. For me, it takes me a second. I get a bit overwhelmed on any set, and it takes some time to warm up.”

So, after the first few days of filming, Holland pulled Gyllenhaal aside just to check in. When Gyllenhaal told him he was feeling “frazzled,” Holland replied that he felt the exact same way when he first put on the Spidey suit for 2016’s Captain America: Civil War. Everyone does, he added.

Image zoom JUCO for EW

“Marvel does this all the time, [where] you come in, learn your lines, and then they’ll give you six pages of dialogue and say, ‘Yeah, we re-wrote it, here you go, are you ready to film?’” Holland explains. “You go, ‘Wait a minute! Don’t I need to learn my lines?’ So [that’s] a bit of an overwhelming first day, and I think he needed a friend to be like, ‘Dude, it’s all good, I’ve been there.’”

“When he took on the responsibility of leadership, he did it in such a beautiful way, even though we share a difference of many years in our ages and experience,” Gyllenhaal adds. “I really looked up to him in that sense. He did it in such a kind way. Actors, you don’t always easily exchange that kind of kindness. [Sometimes] people offer help, or they don’t want it, or there’s egos involved. There was just no ego [from Tom].”

There may not have been ego, but there sure was a lot of giggling.

“[We went] from doing some really, really powerful stuff and doing a great scene to us laughing our asses off for 20 minutes and driving the crew nuts,” Holland says. “We’re great friends off screen, so we kind of got to allow our relationship to blossom on screen.” Superhero movies may end, but friendship is forever.