It took a murderous Idris Elba and a pair of dolphin buddies to defeat “Guardians of the Galaxy” at movie theaters.

The Sony thriller “No Good Deed,” which stars Elba as an escaped convict and Taraji P. Henson as the innocent he terrorizes, opened on top of the box office with $24.5 million, according to studio estimates Sunday. And Sony wasn’t surprised.

“It’s a movie that we really loved and felt that it was going to win,” said Sony distribution chief Rory Bruer. “You have to give it to the cast in Idris and Taraji. Their chemistry together is fantastic.”

The film nearly doubled its reported budget in its first week of release, said Paul Dergarabedian, senior media analyst for box-office tracker Rentrak.

“It’s the first brand new, post-summer release to really catch on,” he said.

The Warner Bros.’ feel-good film “Dolphin Tale 2” debuted in second place with $16.5 million. The family-friendly story stars Morgan Freeman and Ashley Judd reprising their roles from the 2011 original.

“Guardians” slipped to third place with $8 million in ticket sales. The Marvel space adventure, which held the No. 1 spot for four weeks, is the top-grossing film of the year domestically, collecting more than $300 million in North America and $600 million worldwide.

Paramount’s “Teenage Mutant Ninja Turtles” finished fourth with $4.8 million, followed by the Fox comedy “Let’s Be Cops,” which collected $4.3 million.