SALT LAKE CITY — Unsurprisingly, the secrecy behind “Avengers: Endgame” spilled over into the production of “Spider-Man: Far From Home” — causing a bit of stress during the filming process, according to director John Watts.

In an interview with io9, Watts said he had been looped in on the events of “Endgame” and its predecessor, “Infinity War.” Of course, Peter Parker (Tom Holland) is snapped out of existence by Thanos before returning in “Endgame’s” finale, which sets up the events of “Far From Home.”

“This movie was developed knowing that we would be dealing with the immediate fallout of the events of those films. It was always a part of the story but it is a little stressful knowing those kinds of spoilers and not being able to tell anyone for a really long time,” Watts said.

Marvel Studios president Kevin Feige added that the implications of Thanos’ snap were set in stone years before “Far From Home” began production, so producer Amy Pascal, Watts and writers Chris McKenna and Erik Sommers were all keyed in on the story beats leading up to the Spider-Man sequel.

Watts also said marketing “Far From Home” following Spider-Man’s apparent death in “Infinity War” was challenging — and ultimately fell to Sony to figure it out.

"It was always like, how are we going to market this movie?” Watts said. “How do you make the first trailer when the character is still dead? Very carefully.”

Vanity Fair also notes that Sony’s insistence on releasing “Far From Home” caused headaches for Marvel Studios earlier this year, since the very existence of the film’s trailers confirmed at least Spider-Man and Nick Fury would recover from Thanos’ snap.

However, Pascal said she feels that the relatively spoiler-free trailers released ahead of “Endgame” still managed to preserve the film’s secrets.

“Obviously, it was really important to protect 'Endgame' and not come out with anything before that movie came out. But I think it worked out great for both movies because, obviously, 'Endgame' was great for Spidey,” Pascal said. “It worked out for everyone.”

"Spider-Man: Far From Home” is out in theaters now.