WARNING: The following article contains spoilers for Spider-Man: Far From Home, in theaters everywhere.

With Tony Stark's heroic sacrifice in Avengers: Endgame, Peter Parker is need of a new father figure. As Spider-Man: Far From Home opens, eight months following the events of Endgame, the teen hero finds himself as the reluctant recruit in a globetrotting mission from Nick Fury (Samuel L. Jackson), master spy and one-time director of S.H.I.E.L.D. Far gruffer and less patient than Tony, Fury quickly finds himself out of his element in the middle of a high school class trip abroad.

For Far From Home screenwriters Chris McKenna and Erik Sommers, that made Fury the perfect choice to team up with Spider-Man in new Marvel Cinematic Universe adventure.

RELATED: Stranger Things & Far From Home Succeed By Allowing Their Kids to Be Kids

"It was a dream come true to write for Sam Jackson," McKenna told CBR. "It was so much fun. Nick Fury is the last person in the world who should be reacting to teen hormones, drama and Peter's classmates constantly barging in."

Spider-Man: Far From Home

 

The writers pointed to the sequence in which Fury first meets Peter (Tom Holland) in a Venetian hotel to recruit him to partner with Quentin Beck, aka Mysterio (Jake Gyllenhaal), to fight the Elementals rampaging across Europe. After tranquilizing Peter's best friend Ned Leeds (Jacob Batalon), Fury is repeatedly interrupted by Peter's classmates and teachers as he attempts to brief the young hero, to the frustration of the veteran spy. For the writers, the sequence was a prime example of Peter's civilian identity and his superhero alter ego colliding as one of the themes of Far From Home.

RELATED: Spider-Man: Far From Home Easter Eggs and References Everyone Missed

"[This movie] is where Peter's personal life really starts smashing into his life as Spider-Man," Sommers said. "The moments and scenes where Fury intersects with Peter throughout the story are [the most fun] examples of that in the movie."

Nick Fury and Maria Hill in Spider-Man: Far From Home

According to director Jon Watts, Nick Fury had originally been intended to serve as a more mismatched mentor figure for Peter in Homecoming before being replaced by Tony Stark as a father figure. With Tony now dead, Watts worked closely with McKenna and Sommers to pair the world-weary spy with the idealistic teen hero.

RELATED: Far From Home Twitter Account Calls Fan Out Over Pirated Screenshots

"We worked closely with Jon, who is a great director and great writer, along with people from Marvel [Studios], Pascal Pictures," Sommers said. "We would go down a lot of roads as we were breaking the story."

McKenna and Sommers, who also co-wrote Homecoming and Ant-Man and the Wasp, worked on Far from Home through post-production, tweaking dialogue and adding lines during principal photography. Through it all, the found that Fury's inclusion in the story remained one of the biggest joys.

Directed by Jon Watts, Spider-Man: Far From Home stars Tom Holland, Samuel L. Jackson, Zendaya, Cobie Smulders, Jon Favreau, JB Smoove, Jacob Batalon and Martin Starr, with Marisa Tomei and Jake Gyllenhaal.