Spielberg got 2.5% of "Star Wars" earnings after Lucas was worried it wouldn't be a success. AP/Wally Fong A long time ago on a film set far, far away, two directors made a friendly bet about a small space-fantasy film called " Star Wars."

Steven Spielberg would go on to win the bet and take millions of dollars from George Lucas over time.

Here's how the out-of-this-world wager came to be.

The Troubles Of "The Star Wars"

In the mid-1970s, science-fiction films weren't very popular.

1968's " 2001: A Space Odyssey" led the way for the genre but made just $56 million at the box office. So when a young director named George Lucas was trying to sell a script called "The Star Wars," based on "Flash Gordon" space serials, not many studios were eager to make it.

The Bet

According to an interview with Spielberg for Turner Classics Movies, Lucas came to the set of "Close Encounters" out of sorts after problems with his passion project. Needing to recharge, Lucas spent a couple of days on set.

Troubles with the production caused Lucas to believe that "Star Wars" was going to completely bomb.@TheWookieRoars/Twitter

"George came back from 'Star Wars' a nervous wreck," Spielberg said. "He didn't feel 'Star Wars' came up to the vision he initially had. He felt he had just made this little kids' movie."

After a few days, Lucas realized something else: Spielberg's "Close Encounters" was going to be so much more successful than "Star Wars." So much more that he felt like making a bet with Spielberg.

Spielberg would later say:

"He said, 'Oh my God, your movie is going to be so much more successful than 'Star Wars'! This is gonna be the biggest hit of all time. I can't believe this set. I can't believe what you're getting, and oh my goodness.' He said, 'All right, I'll tell you what. I'll trade some points with you. You want to trade some points? I'll give you 2.5% of 'Star Wars' if you give me 2.5% of 'Close Encounters.' So I said, 'Sure, I'll gamble with that. Great.'"

A Financial Empire

According to Spielberg, Lucas sends him money from the bet to this very day. Jason Kempin / Getty Images

Spielberg's gamble paid off. Big time.

Released May 25, 1977, on a budget of $11 million, "Star Wars" — later retitled "Star Wars, Episode IV: A New Hope" — went on to make $460 million in the U.S. alone.

Adjusted for inflation, the film has made $1.48 billion at the box office, making it the second-biggest box-office hit of all time — only behind "Gone With The Wind."

By our calculations, this means Spielberg's 2.5% could have made him nearly $40 million.

"'Close Encounters' was just a meager success story. 'Star Wars' was a phenomenon," Spielberg said a few years ago. "Of course I was the happy beneficiary of a couple of net points from that movie, which I am still seeing money on today."

Sequels "The Empire Strikes Back" and "Return of the Jedi" would also go on to be great successes leading to prequels, rereleases, and merchandising, making the "Star Wars" franchise one of the biggest in Hollywood, reportedly worth $30 billion and growing.

NOW WATCH: Neil deGrasse Tyson Tells Us Why 'Star Trek' Is So Much Better Than 'Star Wars'

Popular from BI Prime

Close iconTwo crossed lines that form an 'X'. It indicates a way to close an interaction, or dismiss a notification.Check mark iconA check mark. It indicates a confirmation of your intended interaction.