The polarizing ending of Gillian Flynn’s bestselling thriller “Gone Girl” has been completely reworked for David Fincher’s screen adaptation. In fact, Flynn herself wrote an entirely new final act for the screenplay.

Flynn revealed the twist in this week’s issue of Entertainment Weekly, which features a cover, shot by Fincher himself, depicting Ben Affleck and Rosamund Pike lying in a morgue.

“Ben was so shocked by it,” Flynn told the mag about the screenplay. “He would say, ‘This is a whole new third act! She literally threw that third act out and started from scratch.’”

The former EW writer said she didn’t shy away from killing her darlings.

“There was something thrilling about taking this piece of work that I’d spent about two years painstakingly putting together with all its 8 million Lego pieces and take a hammer to it and bash it apart and reassemble it into a movie,” she said.

The impetus behind the major amendment to the story is unclear, but Fincher did tell EW that he “may have been too beholden to the source material” of Stieg Larsson’s novel “The Girl With the Dragon Tattoo” when bringing it to the bigscreen in 2011.

“Gone Girl” hits theaters on Oct. 3.