The organ roared through the Kennedy Center Concert Hall on Thursday night, lit from below with colored lights, emitting big, shuddering chords — a cross between high art and Halloween.

It all fit. Bartok’s “Bluebeard’s Castle” — which the National Symphony Orchestra performed Thursday and will play again Saturday night — partakes of the lurid spookiness of a ghost story, telling the familiar tale of a castle’s seven locked doors opened one by one by Duke Bluebeard’s overcurious new bride, Judith. It’s also one of the greatest operas of the 20th century, and Christoph Eschenbach and the NSO gave it a rousing performance.

Thursday’s all-Bartok program was the NSO’s first contribution to “The Music of Budapest, Prague and Vienna,” the Kennedy Center’s ongoing festival, which leads orchestra-goers to lands they’ve often traversed. The program opened with “The Miraculous Mandarin,” a ballet score that NSO subscribers last heard as long ago as, oh, 2010. The “Mandarin,” however — dark and fast and lurid, though somewhat sanitized by Eschenbach’s innate eagerness — was effectively a warm-up for “Bluebeard.” And “Bluebeard” in this hall is a genuine rarity; the orchestra had played it only once before, in 1972.

“Bluebeard’s Castle” lies somewhere between opera and oratorio. It’s written for only two singers, who are onstage the whole time, and although a gifted set designer can go to town with it, the score is so full of drama and image that it’s almost a shame to limit it to an actual stage picture.

Rarely has music fit a story so well: dark, exhilarating, threatening, turning corners reveal vistas of breathtaking beauty. Dramatic and episodic, furthermore, it plays to Eschenbach’s particular strengths. Perhaps no other conductor exults so much in the ability to make huge, gorgeous sound with some extra-musical significance. And Eschenbach’s small frame vibrated with the towering chords after Judith opened the fifth door and saw the majestic vista (in C-major) of the duke’s lands stretching out before her.

Matthias Goerne is Eschenbach’s favorite singer — with some reason — and he has certainly been featured this week, returning for “Bluebeard” after his “Winterreise,” with Eschenbach on piano, on Monday night.

The question about “Bluebeard” was how well Goerne’s dark, rich baritone would do in a role usually sung by an inky-voiced bass. The answer was well enough. The score emphasized what has become a deep mahogany quality in his lower register, a sound so thick and tangible that you could sink your hands into it. But the lowest notes were less natural a fit, and that — coupled with Eschenbach’s tendency to lose track of the orchestral balances in moments of intensity — paled the drama in a couple of places, notably toward the end.

As Judith, Michelle DeYoung had an even harder struggle to cut through the full orchestra. Although she has a career as a dramatic mezzo-soprano, I’m not entirely convinced she has the stature for this role; she played Judith as slightly ditzy, and her voice didn’t have as much presence as one might have liked.

The NSO was extra-imposing partly because of sheer volume; these are densely orchestrated pieces. But some individuals also stood out; Loren Kitt was effective in the clarinet solos delineating a would-be seductress standing by a window to lure in passersby. And Nurit Bar-Josef, the concertmaster, evoked the cold glitter of light on jewels with little scratchy descending figures.

It was only disappointing that the fine-tuning of the ensemble sometimes fell flat. After the massive power and thrill of “Bluebeard,” the end of the opera flagged because of imprecision, even before the lights on the organ had faded to black to signal that Judith, like Bluebeard’s other wives, was silenced forever.