LOS ANGELES -- "Pan" produced no Neverland magic at the box office.

The fantasy, which cost an estimated $150 million to produce, earned $15.5 million in its opening weekend, according to Rentrak estimates Sunday making it one of the worst bombs of the year. Early tracking did not look promising for the Joe Wright-directed film but still predicted that "Pan" would open at least in the $20 million range.

The PG-rated epic, sold as a Peter Pan origin story and a lavish visual feast, has had a bumpy ride from the beginning, starting when actress Rooney Mara, who is white, was cast as Tiger Lily, who is historically Native American. The film, starring Hugh Jackman and Garrett Hedlund, also had been pushed from July to October. It has not been well-received by critics, either.

"Pan" now ranks among 2015's biggest flops, including "Fantastic Four" and "Tomorrowland." International earnings don't look promising either. The film brought in a weak $20.5 million. For comparison, "The Martian" earned $58.1 million.

"This had a lot going against it," said Paul Dergarabedian, a senior media analyst for Rentrak.

He also believes competition in the family market from the Halloween-themed animated feature "Hotel Transylvania 2" hurt "Pan."

"Family films always have an audience, but that audience is extremely fickle and hard to please, just like the kids who go to these movies," Dergarabedian said. "You just never know what's going to resonate."

Sony's high-wire spectacle "The Walk" also stumbled in its first weekend in wide release, after debuting on IMAX screens last week. The tale of Philippe Petit's tight-rope walk between the towers of the World Trade Center earned $3.7 million this weekend, bringing its total to $6.4 million. Joseph Gordon-Levitt stars in film directed by Robert Zemeckis.

Not all was bleak at the box office, though. Ridley Scott's space adventure "The Martian" earned a solid $37 million in its second week in theatres, nabbing the top spot once more. Its domestic total now stands at $108.7 million.

"Hotel Transylvania 2" took second place in its third weekend with $20.3 million, bumping its total to $116.8 million. "Pan" came in at No. 3.

Nancy Meyers' workplace comedy "The Intern" earned $8.7 million, and the border thriller "Sicario" brought in $7.4 million, rounding out the top five.

Outside the top 10, "Steve Jobs," the biopic of the late Apple CEO directed by Danny Boyle and written by Aaron Sorkin, opened in four theatres in New York and Los Angeles to a powerful $520,942. Its $130,000 per-theatre average ranks as the best of the year and should bode well for the film's expansion across the next two weeks.

"This is a movie everyone's talking about, and now they're going to be talking about it even more," Dergarabedian said.

------

Estimated ticket sales for Friday through Sunday at U.S. and Canadian theatres, according to Rentrak. Where available, the latest international numbers for Friday through Sunday are also included. Final domestic figures will be released Monday.

1. "The Martian," $37 million ($58.1 million international).

2. "Hotel Transylvania 2," $20.3 million ($22.7 million international).

3. "Pan," $15.5 million ($20.5 million international).

4. "The Intern," $8.7 million (14.8 million international).

5. "Sicario," $7.4 million ($6.4 million international).

6. "Maze Runner: The Scorch Trials," $5.3 million ($16 million international).

7. "The Walk," $3.7 million ($5.2 million international).

8. "Black Mass," $3.1 million ($2.6 million international).

9. "Everest," $3 million ($8.1 million international).

10. "The Visit," $2.4 million ($2.6 million international).

------

Estimated ticket sales for Friday through Sunday at international theatres (excluding the U.S. and Canada), according to Rentrak:

1. "The Martian," $58.1 million.

2. "Goodbye Mr. Lover," $32 million.

3. "Hotel Transylvania 2," $22.7 million.

4. "Inside Out," $21.6 million.

5. "Pan," $20.5 million.

6. "Maze Runner: The Scorch Trials," $16 million.

7. "The Intern," $14.8 million.

8. "Everest," $8.1 million.

9. "Fack ju Gohte 2" and "Er ist wieder da," $7.3 million.

10. "Lost in Hong Kong," $7.2 million.