LOS ANGELES (AP) — The news was good for two of the three new openers this weekend.

Christopher Nolan's World War II epic "Dunkirk" topped the charts with $50.5 million, while the buddy comedy "Girls Trip" earned $31.2 million to take second place. Both well-reviewed films toppled modest expectations.

But things were not so bright for Luc Besson's "Valerian and the City of a Thousand Planets." The costly sci-fi spectacle pulled in only $17 million for a fifth-place start behind holdovers "Spider-Man: Homecoming," which drew $22.2 million, and "War for the Planet of the Apes," which earned $20.9 million.

The top 20 movies at U.S. and Canadian theaters Friday through Sunday, followed by distribution studio, gross, number of theater locations, average receipts per location, total gross and number of weeks in release, as compiled Monday by comScore:

1. "Dunkirk," Warner Bros., $50,513,488, 3,720 locations, $13,579 average, $50,513,488, 1 Week.

2. "Girls Trip," Universal, $31,201,920, 2,591 locations, $12,042 average, $31,201,920, 1 Week.

3. "Spider-Man: Homecoming," Sony, $22,150,085, 4,130 locations, $5,363 average, $251,851,666, 3 Weeks.

4. "War For The Planet Of The Apes," 20th Century Fox, $20,884,223, 4,100 locations, $5,094 average, $98,235,137, 2 Weeks.

5. "Valerian And The City Of A Thousand Plan," STX Entertainment, $17,007,624, 3,553 locations, $4,787 average, $17,007,624, 1 Week.

6. "Despicable Me 3," Universal, $13,012,050, 3,525 locations, $3,691 average, $213,620,275, 4 Weeks.

7. "Baby Driver," Sony, $6,070,912, 2,503 locations, $2,425 average, $84,304,851, 4 Weeks.

8. "The Big Sick," Lionsgate, $5,008,143, 2,597 locations, $1,928 average, $24,547,521, 5 Weeks.

9. "Wonder Woman," Warner Bros., $4,608,028, 1,971 locations, $2,338 average, $389,011,307, 8 Weeks.

10. "Wish Upon," Broad Green Pictures, $2,475,013, 2,154 locations, $1,149 average, $10,519,278, 2 Weeks.

11. "Cars 3," Disney, $1,918,697, 1,294 locations, $1,483 average, $144,013,262, 6 Weeks.

12. "Transformers: The Last Knight," Paramount, $1,169,678, 1,025 locations, $1,141 average, $127,606,483, 5 Weeks.

13. "Fidaa," BlueSky Cinemas, $955,455, 130 locations, $7,350 average, $955,455, 1 Week.

14. "De Pere en Flic 2," Entertainment One Films, $570,740, 92 locations, $6,204 average, $2,429,031, 2 Weeks.

15. "Captain Underpants: The First Epic Movie," 20th Century Fox, $461,114, 291 locations, $1,585 average, $71,865,351, 8 Weeks.

16. "47 Meters Down," Entertainment Studios Motion Pictures, $447,820, 449 locations, $997 average, $42,272,276, 6 Weeks.

17. "The House," Warner Bros., $430,021, 453 locations, $949 average, $24,456,269, 4 Weeks.

18. "Maudie," Sony Pictures Classics, $391,064, 233 locations, $1,678 average, $4,065,731, 6 Weeks.

19. "Guardians Of The Galaxy Vol. 2," Disney, $364,450, 268 locations, $1,360 average, $387,259,952, 12 Weeks.

20. "The Beguiled," Focus Features, $257,555, 331 locations, $778 average, $10,160,989, 5 Weeks.

___

Universal and Focus are owned by NBC Universal, a unit of Comcast Corp.; Sony, Columbia, Sony Screen Gems and Sony Pictures Classics are units of Sony Corp.; Paramount is owned by Viacom Inc.; Disney, Pixar and Marvel are owned by The Walt Disney Co.; Miramax is owned by Filmyard Holdings LLC; 20th Century Fox and Fox Searchlight are owned by 21st Century Fox; Warner Bros. and New Line are units of Time Warner Inc.; MGM is owned by a group of former creditors including Highland Capital, Anchorage Advisors and Carl Icahn; Lionsgate is owned by Lions Gate Entertainment Corp.; IFC is owned by AMC Networks Inc.; Rogue is owned by Relativity Media LLC.