With friends, Prokofiev came up with the idea for a ballet adaptation of Shakespeare, after considering “Tristan und Isolde” (but deciding he couldn’t contend with Wagner) and “Pelléas et Mélisande” (feeling the same about Debussy). Then he spent a summer at the artists’ retreat Polenovo, writing a complete annotated piano score in just four months.

“This ballet was conceived in paradise,” Simon Morrison, a music professor at Princeton University and the author of “The People’s Artist: Prokofiev’s Soviet Years,” said in an interview. “Prokofiev was about to create this astonishing diversity of music from his own imagination.”

Still, the ballet was idiosyncratic to a fault. In its original form, it included a Victory Day parade plopped in the middle of the plot. And the divertissements, a parade of showcase dances that are a staple of classical ballet, were inserted right after Juliet takes the potion: “the worst possible moment,” Mr. Morrison said.

But the most unconventional decision Prokofiev made was in the ending: It was happy.

According to the ballet’s original scenario, by Adrian Piotrovsky, Romeo wants to stab himself but is stopped by Friar Laurence. While they are entangled in a struggle, Juliet begins to breathe. Then the stage fills with people, who watch as Romeo and Juliet begin to dance. The music is bright as the young lovers leave the stage in an Orphic apotheosis.