Yesterday, the new film from screenwriter Richard Curtis (Love Actually) and director Danny Boyle (Slumdog Millionaire), offers up a unique premise. The film takes place in a world where The Beatles’ music suddenly ceases to exist. (This happens following a cosmic event of some sort.)

From that point on, no one knows the John Lennon epic “A Day in the Life,” the George Harrison ballad “Something,” or the Paul McCartney tune from which the movie takes its name. Only a young British singer-songwriter of Indian descent is aware of the Fab Four catalog.

Obviously, that’s a formula for success for the struggling musician, and it’s also an interesting premise for a film. On the movie’s opening weekend, Yesterday surprised in theaters with a $17 million take.

That was especially good news for Working Title and the film’s investors. On top of the usual production costs, Yesterday couldn’t launch without securing the rights to classic Beatles catalog. And they didn’t skimp.

‘Yesterday’ needed the rights to 17 Beatles songs.

Ed Sheeran, Lily James and Himesh Patel attend the UK film premiere of ‘Yesterday’ on 18 June 2019 in London. | Wiktor Szymanowicz / Barcroft Media via Getty Images

Since the idea was a musician would introduce the world to The Beatles, filmmakers focused mostly on the group’s most iconic songs. You’re not going to hear less familiar tunes like Harrison’s “Only a Northern Song” or Lennon’s “Rain.”

So the movie goes big on Fab Four material. You’ll hear star Himesh Patel belt out “Let It Be,” “Here Comes the Sun,” “All You Need Is Love,” and other tracks that millions of people still know by heart.

Knowing that it would be pricey, the filmmakers made sure to secure the rights to the music before proceeding with the movie. That way, they wouldn’t find themselves emptyhanded (or gouged) by Apple and Sony/ATV, the entities that control the band’s publishing rights.

Yesterday’s request for licenses wasn’t a small one, either. Altogether, the film used 17 Beatles tracks. In addition to the songs above, the film features “The Long and Winding Road,” In My Life,” “Hey Jude,” “She Loves You,” and more.

Billboard estimates rights to the songs cost $10 million.

The Beatles at a Tokyo press conference. June 1966. | Mirrorpix via Getty Images

According to Danny Boyle and the filmmakers, it takes more than money to get to use Beatles songs. The estates of Lennon and Harrison, along with McCartney and Ringo Starr, need to approve of the project you are working on.

Once Yesterday got the green light, Billboard estimates it cost $10 million to have Patel cover the classic songs in the film. Even though you don’t hear the Fab Four sing and play the songs themselves, it still took that multi-million-dollar payoff to bring the film to life.

For a film like Yesterday, that amounted to a big chunk of the cost to produce the picture. (SNL’s Kate McKinnon may be the most recognizable star to American audiences.) Box Office Mojo pegged the total budget at $26 million.

In other words, the rights to the Beatles’ songs ended up being about 40% of the budget. So far, it seems like it was worth it.

Also see: Did ‘Led Zeppelin IV’ Really Sell Better Than Every Beatles Record?