It’s 2003. Tobey Maguire’s Spider-Man has just become the biggest movie of the year, grossing over $400 million (at the time, one of only four films to achieve that feat). Maguire had just wrapped filming on Seabiscuit, a prestige film that would go on to earn six Oscar nominations including Best Picture. He was, almost inexplicably given his boyish appearance, one of the biggest stars in Hollywood. In the same month, he graced the covers of GQ, Esquire and Teen Beat. He was on top of the world.

And he was about to get fired.

Maguire is a gambler. In recent years Maguire has found a relative amount of success going pro, playing in two World Series of Poker events. Though the Global Poker Index lists his official winnings at $218,858, professional poker player Phil Hellmuth estimates Maguire has won over $10 million over the years at the amateur level. But, while Maguire may be skilled at gambling in Hollywood, he had considerably less success gambling with Hollywood.

After Maguire’s big year, he was looking at the prospects of returning for Spider-Man 2. Maguire, who was paid $4 million for the first Spider-Man film, saw how much the film made at the box office and reportedly wanted a more lucrative contract for future sequels. (By comparison, Andrew Garfield was paid only $500,000 for the first Amazing Spider-Man.) So, the actor allegedly hatched a negotiating tactic: He was going to play hardball.

When director Sam Raimi asked Maguire to spend a day getting his face and body scanned for the complex visual effects scenes planned for the Spider-Man sequel, Maguire refused. Instead, Maguire sent neurosurgeon Dr. Ian Armstrong to meet with Raimi and producer Laura Ziskin claiming that a back injury the actor suffered while filming Seabiscuit left him physically unable to perform some of the complex stunt work planned for the film.

Maguire’s publicist even issued a public statement:

After doing two physically demanding films in a row, Tobey has experienced mild discomfort in his back which is in the final stages of healing. With an April 12 start date around the corner, everyone involved wants to be certain he is able to do the intense stunts.

The star of one of the most anticipated films of the year was prepared to hold out. The only problem? Sony Pictures called his bluff.

Executives at Sony were convinced the back pain was part of Maguire’s negotiating tactics (the actor was reportedly upset Ziskin made more money than he did on the first film). If he really wanted to be a part of the Spider-Man sequel, they thought, why didn’t he personally meet with Raimi and Ziskin instead of sending a doctor to deliver the message? (For his part, Maguire has maintained that any reports it was about money were “ridiculous.”) Within a few days of that fateful meeting, Sony pushed back the release date of Spider-Man 2 from May 7, 2014 to July 2. They also had bad news for Maguire: You’re fired.

If Maguire wanted to play hardball, it was a game the studio knew how to play well. Raimi, Ziskin, and producer Avi Arad quickly met with Jake Gyllenhaal, who Raimi had seen starring alongside Jennifer Aniston in The Good Girl, about taking over as the new Spider-Man. (Raimi would later claim it was for another project; why the meeting took place on the Spider-Man set with the Spider-Man producers has never been explained.) The news became public and Maguire quickly began sweating. A source close to the actor admitted to the Los Angeles Times, “A year from now? The public wouldn’t know the difference” between Maguire and Gyllenhaal as Peter Parker. A prescient point, considering Tom Holland was cast as Spider-Man just one year after Andrew Garfield starred in The Amazing Spider-Man 2.

Maguire, who would later say, “I never understood that we were at that point” where the studio was willing to make the sequel without him, went into panic mode. He sought counsel from Ron Meyer, the father of his then-girlfriend, Jennifer Meyer (now his wife), and not-so-coincidentally the Vice Chairman of NBC Universal, the studio releasing Seabiscuit. Meyer convinced Maguire the Spider-Man role was crucial to his career and that he should, despite what his ego might tell him, fight to get the part back. Meyer even went to Sony head Amy Pascal and asked for clemency. (His pleas were at least partly self-serving; Meyer didn’t want the controversy to effect the prospects of his upcoming Tobey Maguire movie.)

Maguire sent Armstrong back in to meet with the stunt coordinators for the film and revisit some of the more problematic scenes, and suddenly, everything was approved. But that wasn’t all. Sony put their star through a rigorous physical examination and demanded he apologize. As Maguire would later explain to the Los Angeles Times, “[I had to] look these people in the face and say, ‘I’m really sorry. I’m going to do whatever it takes.’”

The actor would later fire his agent, Leslie Siebert. “I feel like I learned a lesson,” said Maguire.

Sony Pictures would continue on with Spider-Man 2 without incident, and despite the entire creative team returning (and solid reviews), the sequel made less money than the original film.

As for Tobey Maguire, despite getting fired and having to beg his way back into the franchise, he was paid $17 million to return for the sequel, a $13 million raise.

More From ScreenCrush