Straight Outta Compton, the film about the rise and fall of rap group N.W.A., has topped the box office.

The Universal Pictures flick from director F. Gary Gray took in $56.1 million, according to Box Office Mojo. Compton bested previous No. 1 flick Mission: Impossible - Rogue Nation, which only brought in $17 million in its third weekend bringing its total gross to over $138 million.

Add new fall shows to your Watchlist now!

The Man From U.N.C.L.E., which also opened this weekend, came in No. 3 with $13.5 million. It was followed by Fantastic Four, which made a disappointing $8 million in its second weekend. The Gift took the fifth spot with $6.5 million.

Rounding out the Top 10 were Ant-Man ($5.5 million), Vacation ($5.3 million), Minions ($5.2 million), Ricki and the Flash ($4.6 million) and Trainwreck ($3.8 million).

VIDEO: Can Josh Jackson still do his Mighty Ducks tricks?