American directors George Lucas (L) and Steven Spielberg hold their Best Director nomination plaques at the Directors Guild of America annual awards dinner held at the Beverly Hilton, Bevery Hills, California, March 11, 1978. Lucas was nominated for his film, 'Star Wars' and Spielberg for his film, 'Close Encounters of The Third Kind,' though neither won. Photo by Frank Edwards/Fotos International/Getty Images)

George Lucas has said repeatedly over the years that, before "Star Wars" became the intergalactic smash it is today, industry insiders expected the space epic to fizzle out. "None of the films I've done was designed for a mass audience, except for 'Indiana Jones,'" he told Wired in 2005, before "Revenge of the Sith" became the year's highest-grossing movie. "Nobody in their right mind thought 'American Graffiti' or 'Star Wars' would work."

All those naïve naysayers apparently rubbed off on the famed creator. It turns out he had a running bet with Steven Spielberg prior to the release of the first "Star Wars" installment and Spielberg's "Close Encounters of the Third Kind," both of which opened in 1977. The two directors, who at the time had achieved only a shell of the fame they later would, wagered that each other's films would be more successful.

That's right, even Lucas didn't have adequate faith in "Star Wars," predicting that "Close Encounters" would outperform it at the box office. They made the bet on the set of "Close Encounters," which Lucas visited as a retreat from the stressful "Star Wars" set, where production was not unfolding as the director imagined. Spielberg, on the other hand, banked on "Star Wars" being more lucrative. Of course he was right: "Star Wars" was the highest-grossing movie of 1977, while "Close Encounters" was No. 3. ("Smokey and the Bandit" was No. 2.)

Lucas and Spielberg had big stakes attached to their bet -- stakes that are still materializing today, Spielberg said in a Turner Classic Movies interview a few years ago.

"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,'" Spielberg recalls. "'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 percent of 'Star Wars' if you give me 2.5 percent of 'Close Encounters.'” So I said, 'Sure, I’ll gamble with that. Great.'"

With a $460 million lifetime gross (the film has been re-released multiple times) in the U.S. alone, Yahoo calculates that Spielberg has earned nearly $40 million from the bet with his friend.

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