The poster for the Broadway musical “Anastasia.” The musical debuted on Broadway on March 23, 2017. PUBLIC DOMAIN

The story of Anastasia has evolved from a historical tragedy to a legend shrouded with murder and intrigue.

The myth was set with the 1997 movie “Anastasia” from 20th Century Fox, but the tale was immortalized when it was taken on stage.

Directed by Darko Tresnjak and adapted by Terrence McNally, the Broadway show of the same name takes the best from the film and adds more. Where the movie was pure fantasy, the play suggests a story behind the scenes of history.

Though the basic plot is similar — an orphaned amnesiac looking for family falls in with a con man pursuing the reward for finding the lost princess Anastasia — the mystical elements from the movie are replaced with historical fiction. The maniacal Rasputin (who, incidentally, had to be brought back from the dead to play the antagonist in the movie) is replaced with a Bolshevik general, torn between his moral compass and his unwavering sense of duty to the communist regime. The general, who goes by Gleb (Constantine Germanacos), is a much more complex and interesting character than the original villain — as a lifelong fan of the original film, I thought the change worked much better for the storyline.

Incorporating the Soviet Union loans more depth to the production, entwining the country’s early issues into the plot. As townsfolk complain about empty stomachs and lives that haven’t changed with revolution, they whisper about the lost princess. “Thank goodness for the gossip that gets us through the day,” they sing.

Though that line was straight out of the movie, the musical’s track, composed by Stephen Flaherty and Lynn Ahrens, is distinctly different. Some key musical motifs and a few of the most iconic songs stay — “Once Upon a December” and “Journey to the Past,” for instance — but otherwise, there’s a completely different score.

The new songs, however, are just as catchy as those from the original soundtrack. “Stay, I Pray You,” sung by Russians in a haunting tribute to their homeland even as they flee for their lives, is one of the best additions — it gave me goosebumps.

To lighten up some of the heavier stuff, like, you know, murder and oppressive governments — McNally included plenty of humor. Two minor characters, Vlad (John Bolton) and Countess Lily (Vicki Lewis), almost carried the show away. Lewis especially commanded the stage — it was rare when she didn’t have the audience engaged.

But what was perhaps one of the best parts was the attention to detail. One song for instance, details Anastasia’s childhood with significant accuracy, for a work of fiction. Anya (the orphaned amnesiac claiming to be Anastasia, played by Christy Altomare) was even found with a diamond sewn into her clothing — something the duchess and her family actually did, to save the family jewels.

No character was static, either. Everyone had their own arc, however big or small. Dmitry (Cody Simpson), the con man, learned that there was more to the world than money. The Dowager Empress (Penny Fuller) learned to let go of her bitterness — she did lose everything, after all — and move on. Anya learned that she could make her own family.

Anastasia, by the end of the production, has outgrown the adolescent nearly murdered in a Russian cellar 10 years earlier. The princess is a towering myth that not even the girl it sprung from can live up to.

“There never was an Anastasia. She was a dream — a beautiful dream,” the play concludes.