The Washington Ballet’s “Sleepy Hollow.” (Theo Kossenas)

Just as the town of Sleepy Hollow was a magical setting for Washington Irving’s classic short story, the ballet inspired by that tale boasts enchantments of its own. The Washington Ballet’s world premiere of Septime Webre’s “Sleepy Hollow” on Thursday was not quite a triumph, but it was a charming, knockabout ad­ven­ture. It revealed Webre at the height of his choreographic powers, featuring a company bristling with well-tempered energy and, most especially, a ballerina with the dramatic capacity to bring the whole fantasy to life.

Xiomara Reyes, a Cuban-born principal with American Ballet Theatre, filled in at the last minute for an injured company member and danced the role of Katrina Van Tassel, the coquettish farmer’s daughter who is wooed by the jiggly-boned schoolmaster Ichabod Crane (Jared Nelson) and the studly practical joker Brom Bones (Jonathan Jordan).

She managed two things at once in this story of love and death in a young America caught between a Puritan past and a rebellious present. First, Reyes absorbed the raw, youthful style of the Washington Ballet dancers, so that she looked entirely like one of their number, with no diva airs to play to the audience.

Second, with her bubbly, living reactions to every moment — and with the challenge she set with her shining technique — she lifted the whole enterprise. Like George Washington rallying his troops at the Battle of Monmouth, Reyes made a powerful, calming impact on the whole ensemble.

It’s as if the whole thing — guest star, lovely dancing, music and design — came together with benevolent sorcery. Webre gave Reyes and his dancers his most sophisticated choreography to date, particularly in the happy-go-lucky scenes of Sleepy Hollow folks enjoying the autumn. There is a terrific dance for the men, led by Jordan, that flows seamlessly into a sweet duet of discovery for him and Reyes.

In his “Legend of Sleepy Hollow,” Irving writes that Katrina is as “ripe and melting and rosy-cheeked as one of her father’s peaches” — and Reyes transformed his words into flesh. She had such freedom in her waist and shoulders that she was almost never perfectly upright.

No wonder Jordan looked spellbound when he danced with her; Reyes had eyes only for him, eyes that teased and lured him. He is always a gentlemanly sort of dancer, a little too careful sometimes. Yet Reyes seemed to have freed an ardent spontaneity you could feel across the footlights. Did I mention that the injured dancer she replaced is Sona Kharatian, Jordan’s wife? It must have been a heavy blow for Kharatian and Jordan to lose a rare chance to dance together. But credit that benevolent sorcery, or better yet, the dancers’ great hearts, that magic was created nonetheless.

The ballet is cast from strength throughout. Nelson gives Ichabod Crane a deeply poignant side. Brooklyn Mack turns the Headless Horseman into a virtuoso with dynamite legs. As the town lunatic, Miguel Anaya overpowers all the rest of the ballet’s spooky forces with his wide, wild eyes.

The rustic autumn is beautifully evoked in Clifton Taylor’s golden lighting and Clint Allen’s projections drawn from paintings of the early 1800s. Matthew Pierce’s original music and arrangements, performed by a live orchestra, give the ballet a sweeping lyrical unity. What a luxury for a full-length production, to have the era, the season, the drama and the emotions so richly enhanced by the music. Liz Vandal’s costumes are period-specific yet light and delightful, and Eric J. Van Wyk’s full-size puppet horses have the right touch of skeletal menace.

But otherwise, the menacing aspects are the least successful parts of the ballet. While Irving’s tale slips from bucolic innocence to supernatural hauntings with ease, Webre’s account does not. When the action shifts to the graveyard, haunted by sexy long-haired zombie witches, or to the forest where Crane and the Headless Horseman tangle, the momentum fizzles. The witches are fetching, but their scene is banal and I just didn’t buy it — it felt like a retread of Michael Jackson’s “Thriller” from left field.

The first few scenes of the ballet, involving a Salem witch trial, need reworking. If we are to take the carefree leaping and soaring of the women accused of witchcraft as a momentary respite from the Puritan prejudice against frivolity, and a reason for why they aroused suspicions, then why does Cotton Mather (Luis R. Torres), who condemns them to die in flames, dance with a similar wide-flung abandon?

Webre’s strengths lie in the theme of the story: the saving grace of fellowship. This is evoked in the sunny sections. With the fine performances on view, they are almost enough to sweep away the clouds.

The Washington Ballet performs “Sleepy Hollow” through Feb. 22. Guest star Reyes is scheduled to dance again Saturday and Sunday evenings.