One of Spider-Man: No Way Home's most unforgettable scenes — where three generations of Peter Parkers meet on a rooftop — was rewritten at least 10 times.

While speaking at a recent IGN Fan Fest panel, No Way Home writers Chris McKenna and Erik Sommers shared the in-depth thought process that went into perfecting the exchange between Tom Holland, Tobey Maguire, and Andrew Garfield.

After it was confirmed that Maguire and Garfield would indeed be involved in No Way Home, both writers agreed that their introduction would come in the third act, since they had "an MCU Peter Parker story to tell." Then, it was a matter of figuring out how Maguire and Garfield's Spider-men would land in the world of Holland's Peter Parker.

"When they got pulled into this movie, what condition were they in? What were they doing? What was their mindset?" said Sommers.

"The end of the last Amazing Spider-Man had this really nice speech from Gwen about staying hopeful and everything. And immediately it became interesting to us," Sommers continued. "Well, what if Andrew Garfield's Spider-Man, if his Peter Parker couldn't do it, he couldn't keep that hope. He was too hurt by what happened. And so, that led us to the attitude that we found for him."

Mckenna and Sommers were also interested in hearing how the actors envisioned their characters, which led to "a lot of conversations and a lot of writing."

Concluded Sommers: "I would say we must have written that scene at least 10 times." In the end, the attention to detail was worth it. The scene gave a glimpse into the emotional toll it takes to put on the Spidey suit, while also setting up the movie's ambitious final act.

Spider-Man: No Way Home: The Coolest Easter Eggs

Did you spot these Marvel Easter eggs and references in Spider-Man: No Way Home?

More From 104-5 KDAT