Quentin Tarantino's Once Upon a Time in Hollywood -- testing whether moviegoers will embrace an original summer tentpole amid a tsunami of branded IP -- successfully rode its first wave in launching to $40 million at the North American box office.

As expected, the Sony movie placed second for the weekend behind Disney's The Lion King, which is now only days away from crossing the $1 billion mark. The Jon Favreau film took in $75.5 million in its sophomore outing for a domestic tally of $350 million and $962.67 million globally.

Thanks to the combined strength of the two very different films, the year-over-year deficit at the domestic box office through Sunday was further reduced to 6.5%, according to Comscore. Less than two weeks ago, it was 9%.

The R-rated Once Upon a Time -- teaming Leonardo DiCaprio and Brad Pitt for the first time on the big screen -- narrowly edged out Inglourious Basterds ($38 million) to mark the best weekend opening of Tarantino's career, not adjusted for inflation. However, it will need strong staying power to ultimately be deemed a success. In contrast to glowing reviews, the film received a B CinemaScore from audiences, which could impact word of mouth.

Set in the winter and summer of 1969, Tarantino's ninth film is is a twinned tale of a changing Hollywood and the Manson Family, a tough subject. DiCaprio plays a washed-up Western star desperate to keep his career going, while Pitt plays his longtime stuntman. Margot Robbie plays Sharon Tate, the actress and wife of Roman Polanski who was murdered by Manson's followers.

Once Upon a Time cost $90 million to produce after tax incentives and rebates, making it the maverick filmmaker's most expensive film to date (that doesn't include marketing). It's also the first he didn't make for Harvey Weinstein.

The movie skewed heavily male, or 58%. It played younger than expected, with nearly 60% of ticket buyers between ages 18 and 34, according to PostTrak. It performed best on both coasts -- six of the top 10 locations were in Los Angeles.

Heading into the weekend, Sony remained conservative in predicting a $30 million opening, while rivals and other box office analysts projected a start in the $40 million to $50 million range. Once Upon a Time is playing in 3,659 theaters, the widest footprint ever for Tarantino.

Sony also claimed third place with Spider-Man: Far From Home, which grossed $4.9 million domestically for a global tally of $1.03 billion.

Disney/Pixar's Toy Story 4 followed with roughly $10 million as it neared the $400 million mark domestically. Paramount's Crawl rounded out the top five in North America with $4 million for a global total of $45.9 million.

Among specialty films, Lulu Wang's platform release The Farewell continued to impress as it cracked the top 10 in its third weekend. The A24 release grossed $1.5 million from 135 theaters to place No. 10. The Farewell stars Awkwafina as the daughter of Chinese immigrants who is forced to go along with the family's deception of her beloved grandmother back home.

This article originally appeared on The Hollywood Reporter.