 The story had long been a favorite of his, and his wife Nadezhda had encouraged him to write an opera based on it from the day of their betrothal, when they had read it together.While musical ideas for such a work predated 1877, now they came with greater persistence.By early 1878 the project took an increasing amount of his attention; in February he started writing in earnest, and he finished the opera by early November.