Ben Affleck thriller Gone Girl has topped the US box office on its debut weekend, taking $38 million according to early estimates.

The film, which also stars British actress Rosamund Pike, is about a man who comes under suspicion when his wife mysteriously disappears.

Annabelle, featuring the creepy doll from 2013 horror The Conjuring, was a close second with $37.2 million.

“It was virtually a photo finish,” said media analyst Paul Dergarabedian.

“These two movies couldn’t be more different,” he added.

“It shows how if the marketplace presents a diversity of product, audiences will come out. It’s the third and fourth $30 million debut of the past two weeks. It’s been a great post-summer run.”

Gone Girl is based on the best-selling novel by US author Gillian Flynn and is directed by David Fincher, the film-maker behind The Social Network and The Curious Case of Benjamin Button.

Published in 2012, Flynn’s novel has sold more than six million copies. Earlier this year, she was commissioned by the Hogarth Shakespeare project to rewrite The Bard’s tragedy Hamlet.

Back at the box office, last week’s number one, The Equalizer starring Denzel Washington, slipped to third place with $19 million.