Foreign audiences weren’t enchanted by “Pan.”

The big-budget fantasy crashed to earth this weekend, earning a drab $20.5 million overseas while debuting in 52 markets. That represents over 40% of the international marketplace and spells trouble for Warner Bros., the studio behind the $150 million production. In order to turn a profit, “Pan” needs to make at least $400 million. So far, it has only managed to hit $40.6 million globally.

“Pan” flopped domestically, picking up $15.5 million. In terms of its reception abroad, audiences in Mexico and Russia were the most enthusiastic, delivering debuts of $2.7 million and $2.1 million, respectively. The most important test for the film will be China, where it opens on Oct. 22. The world’s second-biggest market for film has helped cushion the blow for films like “Terminator Genisys” that were rejected by U.S. crowds.

With “Pan” failing to generate much heat, Fox’s “The Martian” topped foreign charts for the second consecutive weekend, earning $58.1 million from 12,795 screens in 74 international markets. Among the highlights, the Matt Damon film about a stranded astronaut scored the studio’s biggest opening weekend in South Korea with $12.7 million. It also opened in first place in Russia with $7.2 million and topped charts in the United Kingdom with $6.2 million. Globally, “The Martian” has earned $227.7 million, putting it in good position to make a healthy return on its $108 million production budget.

Second place went to “Goodbye Mr. Loser,” a time travel comedy that has been dominating the Chinese box office. The film made $32 million, bringing its total receipts after two weeks to $132.3 million.

With “Pan” nabbing fifth place, the third and fourth slots went to “Hotel Transylvania 2” and “Inside Out.” The animated sequel to “Hotel “Transylvania” picked up $22.7 million, pushing its global haul to $207.7 million. It should have no trouble matching the $358.4 million that the first film made during its 2012 run.

“Inside Out,” the beloved Pixar film about a young girl’s emotional life, passed the $800 million mark last week after bringing in $11.7 million in its first six days of release in China. Overseas, the picture added $21.6 million to its $818.7 million in receipts and now ranks among the 50 highest-grossing films in history.