Originally titled "The Heretic", the book was written in part as a deliberate attempt to challenge social mores. In the course of the story, Heinlein uses Smith's open-mindedness to reevaluate such institutions as religion, money, monogamy, and the fear of death. Heinlein completed writing it ten years after he had plotted it out in detail. He later wrote, "I had been in no hurry to finish it, as that story could not be published commercially until the public "mores" changed. I could see them changing and it turned out that I had timed it right."