Like so many, Chris McKenna and Erik Sommers grew up loving Spider-Man — from the animated TV series to the action figures to, as they became adults, Sam Raimi’s live-action movies starring Tobey Maguire. But when the screenwriting team (“The Lego Batman Movie,” “Jumanji: Welcome to the Jungle”) were recruited to work on 2017’s “Spider-Man: Homecoming,” starring Tom Holland, roughly six weeks before production, their attention wasn’t on the web-slinger. It was on the film’s villain, Adrian Toomes (Michael Keaton).

“I think everyone knew that the villain needed some help,” says Sommers. “We definitely worked on that quite a bit.”

Thankfully, McKenna and Sommers’ efforts on “Homecoming” ended up becoming a five-year odyssey with the friendly neighborhood web-slinger. They’re the sole credited screenwriters on 2019’s “Spider-Man: Far From Home” and the hotly anticipated “Spider-Man: No Way Home,” which opens worldwide Dec. 17 and aims to bring at least this chapter of Peter’s journey to a close. The duo shared with Variety some (spoiler-free!) highlights of the experience, including alternate origins for Jake Gyllenhaal’s Mysterio, what other Spider-Man villain almost headlined “No Way Home,” and how they managed to fool a Guardian of the Galaxy.

Lazy loaded image
Chris McKenna and Erik Sommers at the premiere of “Spider-Man: No Way Home” on Dec. 13, 2021. Eric Charbonneau for SPE

Swinging by the Seat of Their Pants

On “Homecoming,” McKenna and Sommers learned quickly that working with Marvel Studios (which co-produced Holland’s “Spider-Man” movies with Sony Pictures) can be an exercise in laying down tracks after the train has left the station. Originally, Peter and Toomes weren’t supposed to battle until the third act, but the screenwriters felt the characters needed to tussle much sooner.

So while shooting a scene in which Peter and his classmates leave for a school event in Washington, D.C., the two found themselves proposing a confrontation during a truck robbery to director Jon Watts and producers Kevin Feige and Amy Pascal that would upend the established plan for what was going to happen after the kids arrive.

“I remember standing in front of Kevin and Amy and everyone at the video village and pitching them, like, ‘There’s gonna be this truck, and they’re gonna use this thing,’” Sommers says with a laugh. “They agreed that that’s what the movie needed.”

The added scene not only required finding a new location and rousting up some trucks for Toomes to rob, it also altered how Peter ends up stuck inside a giant warehouse run by the Department of Damage Control.

“There was a version where he was going in and pretending he was with the school paper,” says McKenna. “I don’t remember what draft that was. But it really was not quite working.”

“It was about just trying to create a face-to-face confrontation between our hero and our villain, and so let’s have him spoil one of these heists,” adds Sommers. “Kevin and Amy and Jon Watts, more than anyone, was able to just be like, ‘Alright, yeah, let’s do that.’ And even though we were already in production, all of a sudden there was a new sequence they were working on.”

Getting the Inside Track on ‘Endgame’

The writers began work on “Far From Home” soon after the release of “Homecoming” in 2017 — which means they had to be briefed on “Avengers: Infinity War” and “Avengers: Endgame” years before they were released.

At first, McKenna downplays how much intel he and Sommers were privy to. “It was on a need-to-know basis,” he says with a smile. But what they needed to know were two of the biggest spoilers in the films: Peter turns to ash after Thanos’ snap in “Avengers: Infinity War,” disappearing for five years, and that Tony Stark dies in the climax of “Avengers: Endgame.”

The phenomenon of the Blip let the writers play with what it would be like for Peter and most of his friends to suddenly reappear back in high school five years later.

“We were really, like all the ‘Spider-Man’ movies, coming at the bigger things from the ground level,” McKenna says. “What was the fun? What would that look like? How would that affect school? Some of the kids would have aged, some of them are still the same age.”

The death of Tony Stark, on the other hand, obviously played a central role in how the writers shaped the story for Peter in “Far From Home.”

“He had lost someone very important to him,” Sommers says. “That helped guide us in terms of, ‘How is the villain of this movie going to weasel his way in to Peter’s life and gain his trust?’ Well, he’s going to use this loss that Peter has suffered, try to exploit that and fill that void for his own reasons.”

Lazy loaded image
Jake Gyllenhaal and Tom Holland in “Spider-Man: Far From Home.” Columbia Pictures / courtesy Everett Collection

Embracing the Comic Book Origins

That weaseling villain is Quentin Beck, a.k.a. Mysterio (Jake Gyllenhaal). In “Far From Home,” Beck uses elaborate, real-time visual effects to trick Peter into thinking he’s a superhero on a mission to defeat giant, rampaging “Elementals” — all so he can get his hands on invaluable weapons defense technology that Tony Stark bequeathed to Peter.

“If you go back to the original comic books, that is Mysterio,” says McKenna. “He’s a special effects artist and he’s the one trying to trick Peter from the get-go and become a hero.” Because that reputation is so well known by comic book fans, McKenna and Sommers initially resisted using it.

“We were like, ‘Well, the character can’t just be that because everyone’s gonna expect it,’” says McKenna. “And then when we pull the rug out from under Peter, everyone’s gonna go, ‘Well, duh.’”

So they explored other options for Beck, including one that leaned even further on the Blip. “He was a guy who got all these powers because he was a thief one day at this high-tech [firm], and everyone blipped away and he was left with all of this awesome tech,” says McKenna.

Ultimately, they landed upon the idea that Beck could claim he was from an alternate universe as the “carrot” that would get everyone, including the audience, to fall for his story that he’s a superhero — and it worked. “Right when the movie came out, we had a meeting with Chris Pratt,” says McKenna. “And Pratt was like, ‘I bought it. I thought Gyllenhaal was a good guy!’”

Exploring Peter’s Identity

Alternative universes factor massively into “No Way Home,” in which Peter and Doctor Strange (Benedict Cumberbatch) confront villains from (at least) two other “Spider-Man” realities. But the writers brainstormed many possible storylines outside of the multiverse, including one involving Spidey nemesis Kraven the Hunter. (In fact, at one point, Kraven was the villain in “Far From Home,” instead of Mysterio.) The brief schism between Disney and Sony over the character, which meant Tom Holland’s Spider-Man could no longer live inside the MCU, also caused McKenna and Sommers to get creative.

“We were taking meetings about it, and going, ‘Well, what would this movie be if it wasn’t in the MCU?'” McKenna says.

“It was like any time you have a limitation thrown on you,” adds Sommers. “Then it creates possibilities and spurs all sorts of creative discussions. Fortunately, they came to their agreement before we were too far down any road, and we were able to jump right in with the old team.”

Through every draft for what became “No Way Home,” McKenna and Sommers always maintained the through-line present in all three films: Peter wrestling with his identity as Spider-Man. Only, by the start of this movie, Mysterio has told it to the world and cast Spider-Man as a villain.

“You feel like he’s settling in, comfortable in his skin, and then boom, it all gets completely blown up because his identity is revealed,” says Sommers. “Now he’s just scrambling.”

“So now he has to, again, struggle with what it means to be Peter Parker, what it means to be Spider-Man,” McKenna adds with a laugh. “It’s like therapy, talking about this stuff!”