Matt Kennedy/Marvel Studios; Courtesy of Warner Bros. Pictures

In a surprise upset, the faith-based ‘I Can Only Imagine’ — about the best-selling Christian song of all time — beats ‘A Wrinkle in Time’ and ‘Love, Simon.’

Ryan Coogler’s Black Panther continued to make history in its fifth weekend at the domestic box office with a haul of $27 million, burying Tomb Raider and becoming only the seventh film ever to cross the $600 million mark in North America.

The other big headline of the weekend was Roadside Attractions and Lionsgate’s faith-based film I Can Only Imagine, which vastly overperformed. The movie debuted to $17.1 million from 1,628 cinemas to defeat A Wrinkle in Time and Love, Simon — the first film from a major Hollywood studio featuring a gay teen protagonist — in a surprise upset.

Black Panther is the first film since Avatar eight years ago to top the chart for five consecutive weekends, and only the third pic to do so in 19 years after Avatar and The Sixth Sense. The Disney and Marvel superhero movie finished Sunday with a domestic total of $605.4 million and $1.182 billion globally. In the U.S., it is only days away from overtaking fellow Marvel film The Avengers ($623 million) to become the top-grossing superhero pic of all time in North America, unadjusted for inflation.

Tomb Raider‘s muted domestic bow of $23.5 million from 3,854 theaters is a disappointment for Warner Bros. and MGM, which partnered in rebooting the female-led franchise that is based on the videogame. In the early 2000s, the Tomb Raider film series — starring Angelina Jolie as Lara Croft — beat the curse that continues to haunt videogame adaptations.

Norwegian filmmaker Roar Uthaug (The Wave) directed the new Tomb Raider, which stars Alicia Vikander opposite Dominic West, Walton Goggins, Daniel Wu and Kristin Scott Thomas. The $90 million film earned a mediocre B CinemaScore, potentially hurting word of mouth. Females made up just 44 percent of ticket buyers.

The movie did make up ground overseas, topping the foreign weekend chart with $84.5 million from 65 markets for an overseas tally of $102.5 million and $126 million globally. That includes a first-place finish in China with $41.1 million.

“I really hoped we would do more than $25 million domestically, but the fact that we were No. 1 globally is terrific news,” says Warners domestic distribution chief Jeff Goldstein. “We always viewed this as an international play.”

Tomb Raider placed No. 2 in North America, followed by I Can Only Imagine, which marks the biggest opening in Roadside’s history. Brothers Jon and Andrew Erwin directed the indie film.

The drama stars J. Michael Finley as the real-life Bart Millard, the lead singer of the Christian band MercyMe who wrote “I Can Only Imagine,” the best-selling Christian single of all time. Dennis Quaid and Cloris Leachman also…