Goldman wrote the original novel while experiencing writer's block, when writing Boys and Girls Together (published in 1964). He was inspired by an article about the Boston Strangler which suggested there might be two stranglers operating, and Goldman wondered what would happen if that were the case and they got jealous of each other. (In the film adaptation, there is only one strangler; Goldman hated this change.[1]) He says as he walked to his office, "the book simply jumped into my head. Start to finish. The whole thing... And I remember getting to my office and frantically scribbling down an enormous number of chapters."[2] Goldman was worried about never finishing Boys and Girls Together, so he gave himself two weeks to write the new novel.
Publication
He published the novel under a pseudonym, Harry Longbaugh, the real name of the Sundance Kid, but the book was eventually republished under Goldman's real name in 1968. Goldman:
Hiram Hayden, my editor, didn't know what to do with [the novel]. He didn't know, like, or read mysteries. There was a great feeling that Boys and Girls Together was going to establish me as a critical figure, which of course was the reverse of what happened, and Hiram kept saying, "I think you'll damage yourself if you bring this out first. Why don't you try and get it published under a pseudonym?" We went to one or two houses and we went to the paperback original place and they said, "Sure". It came out, and got the best reviews of anything I've ever been connected with.[3]