It was originally a screenplay he wrote for the 1947 film of the same name. He later adapted it into a novel, which was published in 1947.