Gyllenhaal's role in "Prince of Persia: The Sands of Time" is considered one of Hollywood's worst examples of whitewashing over the last decade.

“Spider-Man: Far From Home” isn’t just Jake Gyllenhaal’s first Marvel movie, it’s also his first major studio tentpole since the 2010 release of Disney’s “Prince of Persia: The Sands of Time.” The Mike Newell-directed video game adaptation starred Gyllenhaal opposite Gemma Arterton, Ben Kingsley, and Alfred Molina. The film, a critical and box office dud for Disney, is best remembered as being one of the decade’s worst examples of Hollywood whitewashing for casting a white American actor in the lead role instead of a performer of Iranian descent.

The conversation around Hollywood whitewashing became a lot more amplified following the 2017 release of Scarlett Johansson’s “Ghost in the Shell,” so Gyllenhaal’s “Persia” casting in 2010 did not cause as much of a controversy or derail Gyllenhaal’s career. Still, the movie follows the Oscar-nominated actor around as one of the biggest missteps of his career. During a recent chat with Yahoo Entertainment, Gyllenhaal admitted as much.

“I think I learned a lot from that movie in that I spend a lot of time trying to be very thoughtful about the roles that I pick and why I’m picking them,” Gyllenhaal said when asked about “Persia.” “And you’re bound to slip up and be like, ‘That wasn’t right for me,’ or ‘That didn’t fit perfectly.’ There have been a number of roles like that. And then a number of roles that do.”

Disney was hopeful that “Persia” would launch a new franchise for the studio in the same vein as “Pirates of the Caribbean,” but the film’s poor reviews and $336 million worldwide box office killed those dreams. Gyllenhaal rebounded by diving head first into edgier, more character-driven films such as Duncan Jones’ “Source Code,” David Ayer’s “End of Watch,” and back-to-back Denis Villeneuve projects “Prisoners” and “Enemy.” Gyllenhaal’s roles since “Prince of Persia” have earned him some of the best reviews of his career (see “Nightcrawler), but the actor hasn’t been impervious to additional missteps (here’s looking at you, “Demolition”).

Gyllenhaal’s Marvel debut finds him taking on the role of Quentin Beck/Mysterio opposite Tom Holland’s Peter Parker in “Spider-Man: Far From Home.” The Sony release opens in theaters nationwide July 2 and should be one of the big hits of the summer movie season.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.