A talking animated sponge knocked a Navy Seal sharpshooter from the top of the box office chart as "The SpongeBob Movie: Sponge Out of Water" earned $56 million in ticket sales, deposing "American Sniper" after a three-week run at number 1.

The Oscar-nominated war film starring Bradley Cooper and directed by Clint Eastwood finished in second place with $24.2 million at U.S. and Canadian theaters for Friday through Sunday, according to studio estimates.

Another new release, the special effects-laden space saga "Jupiter Ascending," took $19 million to claim the No. 3 spot.

"SpongeBob," the second theatrical film based on the animated television series, follows the yellow sponge and his friends as they travel to the sea's surface to retrieve a secret recipe stolen by a pirate played by Antonio Banderas.

The film far exceeded industry forecasts for an opening of about $35 million.

"The reviews were really excellent, including from some serious, tough critics," said Megan Colligan, president of worldwide distribution for Paramount Pictures, a unit of Viacom Inc. which released the film.

The box office result was also driven by older teens who turned out in stronger numbers than might be expected for a family-friendly film, and by "cool adults who have embraced the character since they were kids and have never let him go," Colligan said.

The film, which cost $74 million, has also taken in $27 million internationally for a global total of $83 million.

"American Sniper," one of the biggest hits of the past year, has earned more than $282 million at U.S. and Canadian theaters since going into wide release on Jan. 16. The film received six nominations for Hollywood's top honors, the Oscars, which will be handed out on Feb. 22.

"Jupiter Ascending" stars Channing Tatum as a genetically engineered interplanetary hunter and Mila Kunis as a down-on-her-luck maid destined for greatness far beyond Earth.

The film, directed by siblings Andy and Lana Wachowski, cost a reported $175 million and received weak reviews, with only 22 percent of 152 critics on the aggregator site Rottentomatoes giving it a "fresh" rating.

Rounding out the top five, another sci-fi film, "Seventh Son" starring Jeff Bridges and Julianne Moore, sold $7.1 million in tickets, while the hit "Paddington," based on the children's book, took $5.4 million, bringing its total to $57 million in just over three weeks.

"American Sniper" and "Jupiter Ascending" were released by Warner Brothers, a unit of Time Warner Inc. "Paddington" was released by The Weinstein Company. Comcast Corp's Universal Pictures released "Seventh Son."

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.