The crime took place on a winter’s night. The perpetrator: any one of a small group of men, all intimates of the victim. The murder weapon: the Internet.

Quentin Tarantino’s latest film,The Hateful Eight is, in part, a locked-room whodunit, a snowbound Agatha Christie. But last January, it was the director himself who was looking for the triggerman in a room full of suspects. Tarantino discovered that someone had leaked the first draft of his script when agents began tangling his phone lines with casting pitches. Injured and outraged, he hastily put the project out of its misery, canceling the film and practically tacking a bill to the front door of the Hollywood Saloon that read “WANTED: the yeller-bellied four-flusher who killed The Hateful Eight.”

“The reason it was so bad was because the small group of people involved who had to be guilty,” says Tarantino. “And these were people I trusted. Normally when I actually show it to people, I’m done. But this first draft was literally just showing it to just a few friends. There were scenes that I wasn’t even ready to write yet, situations I hadn’t even figured out yet. That’s why it was so not ready for anybody but just a couple of the inner circle.”

The way he figured it, there were only six potential leakers, including the three actors to whom he had given the script: Bruce Dern, Tim Roth, and Michael Madsen. Tarantino believed one of them had given the pages to their agent who, in turn, gave it to everyone else.

“Quentin was saying, ‘I only gave the script to [you three], and I know for sure it wasn’t Tim,’ and I was like, ‘Oh, no,’ ” Madsen recalls. “I took that script and put it in my closet in my house the day before I left for Italy. Nobody ever touched my script. I didn’t even show it to my ­family, okay?”

Madsen started to feel like all eyes were on him. “I go, ‘Quentin, man, you got to go do something in public because everyone thinks I did it.’ He starts laughing that laugh of his, and he goes, ‘Don’t worry.’ I said, ‘So are we going to do it or not?’ He said, ‘I don’t know.’ ”

The Hateful Eight is currently in production to be released later this year, but at that point it was deader than the runner-up in a quick-draw duel with Tarantino saying he would adapt the script into a novel instead. “I was sad for all of us that possibly he wouldn’t do it or that he would let something like that get in the way of filming,” says Roth. “I was glad to hear I didn’t do it, though.”

To complicate matters, Tarantino also filed suit against Gawker Media for copyright infringement when the company’s Defamer website posted a link to download a PDF of the leaked script. The suit would subsequently be tossed out, refiled, and eventually dropped by Tarantino, who now admits that the legal saga ended up serving as more of a distraction than redress. “I almost regret the whole suing Gawker because it actually took the light off of what was important,” he says. “My whole thing wasn’t against Gawker, it was against Hollywood practices that have just been considered okay.”

To that end, Tarantino even ended up attending a morning meeting with the agents of William Morris to hold a discussion on integrity and discretion. He says he doesn’t blame people for wanting to get a early glimpse at his film. “You know, when Brian DePalma was doing Scarface​, I wanted to know anything that I could get before it opened,” he says. “A still shot, a shot from the set, anything. I get it.”

After a cool-down period, and a successful live reading of the script, Tarantino decided he would keep the nose rather than continue to spite his face, announcing that The Hateful Eight would, in fact, be going forward. He made a number of changes to the script—including a wholly new ending—and started looking for the actors to round out his cast, albeit slightly more prudently than before. “It wasn’t until I went to audition at his house that he gave me the ending,” Jennifer Jason Leigh says. “He was being really careful by that point.”

Tarantino says he never ended up finding out who was the whodidit in this whodunit— Dern, Roth, and Madsen all still star in the film—but the director says that was one of the reasons he was able to go ahead with the project. “It was interesting because I wrote a mystery but I eventually kind of decided I didn’t want to know who did it,” says Tarantino. “I figured out who the three people it was least likely to be were and who the three people it was most likely to be were, and I was able to just say to myself, ‘It’s one of those six.’”