"Straight Outta Compton" lifted the box office out of its August funk, debuting at No. 1 in the U.S. and Canada with an estimated $56.1 million.

The robust haul was not shocking given the huge fan following for N.W.A, the rap group on which the movie is based, as well as the intense media coverage and strong word of mouth that came with the release. The movie posted the biggest August opening ever for an R-rated film, and it has become the No. 1 musical biopic.

Advertisement

Co-financed by Universal Pictures and Legendary Pictures for $28 million, "Straight Outta Compton" follows N.W.A from its scrappy beginnings in the mid-'80s to its unlikely success and the death of member Eazy-E. N.W.A members Dr. Dre, whose real name is Andre Young, and Ice Cube, a.k.a. O'Shea Jackson, served as co-producers.

Nicholas Carpou, Universal Pictures' head of domestic distribution, said few expected the film to open as strongly as it did.

"I think there was great hope that it would resonate," Carpou said, "and it did that, but it also turned around the box office."

The summer box office had cooled in August after a slew of films, including superhero reboot "Fantastic Four," disappointed. But with help from "Straight Outta Compton," the box office this weekend will be up about 2% versus the same weekend a year ago, when "Teenage Mutant Ninja Turtles" led with $28.5 million, according to research firm Rentrak. Year-to-date, the box office is up about 6%.

Moviegoers had overwhelmingly positive responses toward "Straight Outta Compton," giving it an "A" grade, audience polling firm CinemaScore said. Critics were slightly less enthusiastic but on the whole still positive. The film had an 88% positive rating from critics on Rotten Tomatoes.

As expected, the film played especially well among younger moviegoers and black audiences. About 51% of ticket buyers were younger than 30, and 46% were black. More surprising: About 52% of the audience was female.

The top-grossing theater for the film was in Atlanta, but the next nine were in L.A. "L.A. by far was the biggest," Carpou said. "When you look at our exit polls, it makes sense. Plus, the boys [N.W.A] are locals."

Music biopics can be hard to pull off. Last year, Clint Eastwood's "Jersey Boys," which dramatized the rise of the Four Seasons and followed a highly successful Broadway show, failed to draw fans to movie theaters. It debuted with just $13.3 million in ticket sales. The Warner Bros. release went on to make about $47 million domestically, less than what "Straight Outta Compton" made in its first weekend.

The N.W.A film had a successful marketing campaign, spawning across social media platforms including Facebook and Snapchat, where users could use the "straight outta" logo and insert their own location. Buzz for the film began in February at the Grammy Awards with a promotional spot featuring Dre and Cube revisiting their hometown of Compton.

But the release of "Straight Outta Compton" also came with heightened security. Cinemas in major cities across the country hired additional guards for the film, a precaution taken in wake of a slew of fatal theater shootings, including one last month at a screening of "Trainwreck" in Lafayette, La.

Universal offered to offset the costs of hiring additional security, partnering with exhibitors who requested support. Similar measures have been taken by theaters in the past for films deemed controversial, such as the 1991 gang drama "Boyz N The Hood."

No security incidents have been reported during screenings for "Straight Outta Compton."

Advertisement

The movie has become yet another hit for Universal, which has had a record year thanks to "Furious 7," "Jurassic World" and "Minions." Earlier this month, the studio announced that it grossed $5.53 billion at the worldwide box office, marking the highest-grossing year ever for a studio.

"Straight Outta Compton" was the sixth No. 1 opening of the year for Universal. It also marked the studio's 12th weekend on top of the domestic box office.

Director F. Gary Gray told The Times last week that the film was already a success, regardless of grosses.

"We already succeeded with this film," he said at the premiere last week. Making the film "was hard, it was great, it was challenging and we survived it. I feel so good about the outcome. The box office isn't going to matter 100 years from now."

Coming in at second in the U.S. and Canada, Paramount Pictures' "Mission: Impossible -- Rogue Nation" added $17 million in its third weekend. Its North America haul to date is about $138 million.

Warner Bros.' "The Man from U.N.C.L.E." debuted in third with $13.5 million, slightly lower than expected but on par with some lower tracking estimates.

The action-adventure film, based on the 1960s TV series, stars Henry Cavill, Armie Hammer and Alicia Vikander. Audiences gave it a "B" grade on CinemaScore.

Ticket buyers skewed older. About 86% were older than 25. An estimated 52% of the audience was male.

"It didn't hit a younger audience, and we always knew it would be a challenge," said Jeff Goldstein, the studio's executive vice president and general sales manager. "The context of the '60s and the Cold War is a little foreign to the younger audiences. We hope we can catch a more broad audience as we go along."

Goldstein also noted that the huge opening for "Straight Outta Compton" was unexpected. "I think every now and then you get a movie like that, and it's a cultural phenomenon that you have to be part of," he said. "The film certainly took some of our audience but not the key audience."

Twentieth Century Fox's "Fantastic Four" fell a whopping 69% to land at No. 4 in its second weekend. The film, which cost $120 million to make, added $8 million, bringing its domestic total to $42 million.

Suspense thriller "The Gift," produced by STX Entertainment and Blumhouse Productions, rounded out the top five, adding $6.5 million in its second weekend.

In limited release, Fox Searchlight rolled out "Mistress America" in four theaters in New York and Los Angeles. The Noah Baumbahch-directed film made $94,000 over the weekend for a per screen average of $23,500.