When the original cast — Pine, Saldana, Zachary Quinto, Karl Urban, Simon Pegg, Anton Yelchin and John Cho — signed on for the movie that re-launched the franchise in 2009, they did so with options for two sequels. Despite the fact that studios often will give stars big new deals in case of success, no re-negotiations took place for 2013’s Star Trek Into Darkness. Instead, the Trek cast is said to have received only the nominal raises built into their original contracts. According to sources, Paramount argued that the J.J. Abrams-directed 2009 movie, while well-received, was not a huge blockbuster, grossing $385.7 million (a relative pittance compared to Paramount’s billion-dollar Transformers series or even its Mission: Impossible movies).

After Into Darkness grossed $467 million, Paramount was ready to jump back in for a third movie. But Star Trek 3 ran into delays in the development process: Roberto Orci spent the better part of 2014 writing the script (he also was slated to direct) only to have execs then decide to scrap it and part ways with the filmmaker. In January, Pegg and Dark Blue co-creator Doug Jung were brought in to write a new script. With Fast & Furious franchise director Justin Lin — seen as a get — on board to direct, things were looking like they were back on track.

That's when the actors' deals became an issue.

Paramount was again only looking to give nominal raises based on the original contracts, but some of the stars and their representatives argued that seven years had passed since the deals were struck back in 2007. Under California law, a personal services contract cannot bind someone for more than seven years. That meant the old deals arguably were invalid as of 2014.

Paramount disputed that assessment, and neither side was quite ready to go to court over the law’s interpretation.

Complicating matters, some of the actors had raised their star power considerably since the original film. Pine has gone to headline movies, including Paramount’s own Jack Ryan: Shadow Recruit, while Saldana is now part of Marvel’s Guardians of the Galaxy franchise.

Sources say Paramount ultimately made some concessions to the actors, who got a combination of hefty raises and better performance bonuses. The studio declined to comment.

The biggest winner in the deal? Pine, apparently.

The actor, who portrays Captain Kirk, earned only $600,000 for the 2009 movie (not a surprise considering he was still untested), but is looking to beam out with about $6 million for the new movie. Pine was paid $1.5 million for Into Darkness and was to have been paid $3 million for a third film, according to court documents filed during a 2012 lawsuit between the actor and his former talent agency. So he's doubled his money.

But Paramount also is walking away a winner. Sources say that a condition of the raises for Pine and Quinto was that the studio was granted options for a fourth movie in order to keep one of Hollywood's most iconic pairings, Kirk and Spock, intact.