It's been three years since Marvel Studios and Sony Pictures announced a deal that would bring Spider-Man into the Marvel Cinematic Universe, and now Peter Parker seems to feel right at home. He's appeared in two MCU films (Civil War and Tom Holland's solo debut, Spider-Man: Homecoming), with a third (Avengers: Infinity War) on the way later this year, and Marvel clearly has big plans for him. Bringing everyone's favorite webslinger back home to Marvel Studios was a major coup for the company and its president, Kevin Feige, but it all apparently started with a somewhat contentious lunch meeting.

Back in 2014, Sony Pictures was facing an uncertain future for Spider-Man, a character that had once generated the studio's most popular blockbusters. That year, The Amazing Spider-Man 2, despite earning more than $700 million worldwide, was widely viewed as a critical and commercial failure. The enormous production and marketing costs for the film ultimately led to a profit of just $20 million, and though Sony planned to use the film as a kind of launching pad for future Spidey spinoffs (like a film focused on supervillain team the Sinister Six), a Sony Spiderverse was starting to seem less and less likely.

According to Wall Street Journal reporter Ben Fritz, that's when Feige swooped in.

Marvel sold the Spider-Man film rights to Sony back in 1998, and in the years since, it had almost always felt like the latter company got the sweeter end of the deal by far. By 2014, though, the scales had shifted. Marvel Studios was a shared universe behemoth while Sony's own recent superhero attempts were flagging. Marvel executives and Marvel fans alike were eager to see a new direction for Spider-Man, and the loudest request was a simple one: Give him to the MCU.

In an excerpt from his new book The Big Picture: The Fight for the Future of Movies, Fritz retells Feige's earliest attempts to woo Sony into a Spider-Man deal. In the summer of 2014 (after the May release of Amazing Spider-Man 2), Feige reportedly had a lunch meeting with then-Sony Pictures chairperson Amy Pascal, where he pitched her an idea: launch a new Spider-Man film and let Marvel produce it. Pascal, according to Fritz, didn't take it well.

"Ms. Pascal was so offended," Fritz wrote, "that she threw her sandwich at him and told him, only half-jokingly, to 'get the f*** out.'"

Despite that testy initial meeting, Sony and Marvel kept talking, and ultimately reached a new deal on Spider-Man: Marvel would produce the next film, and Sony would distribute it. The former company would get the resulting toy revenue, while the latter would get the box office profits.

Pascal left her position at Sony in the spring of 2015, but stayed on as a Spider-Man producer under her new company, Pascal Pictures (she's also tied to future Spidey releases). The result was Spider-Man: Homecoming, Sony's most successful blockbuster in more than a decade. Both companies won, and Spidey has a bright future both in and out of the MCU.

Not bad for a partnership that started with a flying sandwich.

The Big Picture is in bookstores March 6.