"Dunkirk" won at the box office and "Girls Trip" surprised.

Christopher Nolan's World War II epic beat expectations this weekend, bringing in estimated $50.5 million in North America. Overall, the film brought in $105.9 million worldwide.

Box office analysts pegged the Warner Bros. film starring Tom Hardy and Mark Rylance at roughly a $40 million U.S. opening, but a wave of rave reviews appeared to push the film higher.

Nolan's choice to show the film in the high resolution 70mm might have helped build buzz, making it a movie that audiences felt they had to see in theaters.

"'Dunkirk' became a must see cinematic event with its epic presentations," said Paul Dergarabedian, senior media analyst at comScore (SCOR). "That may have provided a nice tailwind for the film."

While "Dunkirk" took home the top spot at the box office this weekend, Universal's comedy "Girls Trip" is the bigger surprise.

Related: Why you should see 'Dunkirk' in 70mm

The film came in second place with an estimated $30.4 million domestically. That number not only doubled expectations for the film, but it's also more than the film's budget, which was a little under $20 million.

Dergarabedian noted that "Girls Trip" -- an R-rated comedy starring Regina Hall and Jada Pinkett Smith -- served as counter programming to "Dunkirk." He added that it broke the summer's R-rated comedy curse that tripped up a handful of other films like "Baywatch," "Snatched," "Rough Night" and "The House."

Despite this weekend's surprises, the summer box office is still down about 7% from a year ago. Yet the yearly box office is roughly on track with last year. It's likely to see big gains thanks to a potentially strong fall and winter slate of films.

(Warner Bros., like CNN, is owned by Time Warner (TWX).)