Before the dance, there is the walk.

It is not a graceful walk, at least not by conventional standards, that is being practiced by Ian McKellen in the revival of Strindberg’s “Dance of Death” that opened on Broadway last night. His legs stiffen and stray; his basic navigational instincts betray him.

But his posture is as arrogantly erect as pain allows. And when a footstool intrudes itself into his path, as it will keep doing, Mr. McKellen kicks it away as if it were some importunate, helpless little animal. And he keeps walking. That’s the important thing: he keeps walking.

Lumbering across the long stage of the Broadhurst Theater, Mr. McKellen brings something frightening and majestic to the act of putting one wayward foot before the other. As Edgar, the infirm army captain living in spiteful and isolated wedlock in a dank island outpost, Mr. McKellen projects an aggressive arrogance that doesn’t so much conquer decay as ignore it. Every willed gesture, no matter how sloppy, becomes a death-defying act.

Watching Mr. McKellen’s captain shooting sparks in the dark mouth of mortality is about as thrilling as theater gets. Too long absent from New York’s stages, this English actor, much celebrated here for his Tony- winning performance in “Amadeus” 20 years ago, returns to Broadway to serve up an Elysian concoction we get to sample too little these days: a mixture of heroic stage presence, actorly intelligence and rarefied theatrical technique.

Those who know Mr. McKellen only from his recent eccentric film roles (he’s the Hobbit-advising wizard in the forthcoming “Lord of the Rings”) can’t begin to appreciate his reputation as the greatest living actor of the English-speaking stage. Mr. McKellen needs the space, the amplitude that theater allows. Even playing small and inward, as he did in the title role of “Uncle Vanya” a decade ago, he projects big.

Too big, some critics have argued. But in an age dominated by the pocket Adonises of the screen, there’s rich satisfaction in seeing a performer who combines intellectual integrity with an emotional reach that hugs the very last rows in the balcony. And when you have an actress of comparable fire power, the throaty siren known as Helen Mirren, playing the captain’s adversarial helpmate, Alice . . . well, your only choice is to join the line for tickets.

That said, it must be admitted that this “Dance of Death,” which has been directed by Sean Mathias, doesn’t entirely live up to its leading man. There is for starters the crucial question of the third member of the play’s triangle of shifting power. That’s Alice’s cousin, Kurt, who is portrayed by David Strathairn, an excellent American actor, who here takes his character’s passivity well past the vanishing point.

There are also chafing discrepancies in tone. In its portrait of marriage as a torture chamber, Strindberg’s turn-of-the-century masterpiece presents an obvious temptation to go Gothic, with vampire versus vampire squaring off in the marital ring. To some degree, this product cultivates an aura of Transylvanian kitsch.

Don’t forget that Mr. Mathias’s last Broadway success was his rollicking production of Cocteau’s “Indiscretions” (“Les Parents Terribles”), which was staged as an outlandish Symbolist romp. Here, Santo Loquasto’s set exudes a similar, if more cluttered, look of diabolical whimsy, turning the captain’s island fortress into a haunted house jointly designed by Dali and Disney.

And the music and sound design by Dan Moses Schreier sometimes seems borrowed from “Dark Shadows,” the vampire soap opera. Ditto Natasha Katz’s artful but lurid lighting. When the two combine to underscore the ominous visit of a beggar woman (Anne Pitoniak), you feel you’ve wandered into an old Christopher Lee movie.

This is all, in truth, kind of a hoot. But what Ms. Mirren and especially Mr. McKellen are doing is much more devious and ultimately far more interesting. Working from the playwright Richard Greenberg’s astutely loosened up adaptation and benefiting from Mr. Mathias’s obviously affectionate direction, these performers elicit the Every Marriage aspect in the captain and Alice’s relationship, especially in the first act.

This marriage may be a sort of hell on earth, yes. But is it really so different from that of many couples who have lived long and claustrophobically in each other’s presence, the tics and habits of each tattooed into the mind of the other? What’s shocking about the opening scenes of this “Dance” isn’t the eye-popping open- walled castle of a set; it’s the feeling that you’ve dropped in on a couple that you usually take pains to avoid visiting.

For there is Ms. Mirren, hunkered into her shawl on one side, her voice aquiver with fretfulness and a resentment of such long standing that it has worn at the edges. And there, oh so homey on the opposite side of the stage, is Mr. McKellen’s captain, with an almost pleasant, rectangular smile revealing teeth to watch out for.

As they bicker and snipe, momentarily falling into nasty collusion over the failings of their distant neighbors, you know this is their everyday fare. They must long ago have settled into this acrimonious ritual, from which they clearly draw at least minor pleasure. Their defense of their respective (and hefty) egos is what keeps their blood circulating.

“I suppose you’re attractive . . . to other people, when it suits you,” he says to her, savoring each pause like old brandy. After a minor dispute on how to handle the servant question (a serious one in their case, since no one stays for long), she tells him, “You are a despot with the character of a slave.”

How’s that for a description for an actor to live up to? Yet Mr. McKellen miraculously does, giving credence to the idea that one may smile and smile, however humbly, and still be a tyrant. He is unfailingly polite, jocular and often soft-spoken. Yet there is a demure threat poised behind every courteous gesture.

Notice the captain’s ostensibly loving physical contacts with Alice’s cousin Kurt, who reappears in their lives after a long absence. Edgar clutches Kurt to his chest while pressing a cane or rifle horizontally against Kurt’s back. When Mr. McKellen places his hands on Kurt’s shoulders, you understand the look of slight, panicked nausea on Mr. Strathairn’s face.

It is Kurt’s mere presence, of course, that alters the routine chemistry between Alice and the captain. Now they have an audience and potentially an accomplice. Or is it a victim? In any case, their litany of reciprocal grievances turns into an operatic war that may be either the real thing or merely another diverting military exercise. Kurt may not altogether appreciate their vitriolic performance, but we sure do.

For this is when Ms. Mirren bursts into glorious artificial flower. This actress, known to Americans as the sublimely weary crime solver of “Prime Suspect,” takes her cues from our knowledge that Alice was herself an actress. She has been waiting for a comeback as eagerly and as long as Norma Desmond.

With Kurt to observe her, Alice’s face floods with light; her voice acquires ringing bell tones; anticipating her husband’s imminent death, she sheds her at-home drudgery clothes in two witty variations on dressing to kill. Alice’s seduction of her cousin, as she rocks fervidly from foot to foot, is scary, funny and sexual at once. And just wait till she (literally) lets her hair down.

This is also, unfortunately, where Mr. Strathairn’s performance runs aground. In the earlier scenes with the couple, the actor’s air of quiet uneasiness works fine, as he becomes both target and confessor to the ailing captain. The role is partly a stand-in for Strindberg, and it’s tough to pull off. But at some point, Kurt has to be transformed into a monster on the level of his hosts, and Mr. Strathairn is unwilling to make that leap. He disappears when he should be most visible.This sense of a vacuum detracts from “Dance” as a study of a marriage. We need that third point in the temporary triangle to make full sense of the dynamic that keeps Alice and the captain together. The emphasis instead shifts to another relationship, that of the captain with death. And if this makes the play a tad lopsided, it also allows Mr. McKellen to give a performance that will become a touchstone for anyone else playing the part.

I can’t think of a more profound or unsettling study in denial from my theater-going experience. The first thing you have to know about Mr. McKellen’s captain is that he is indeed dying; the second thing is that he intends to treat death as he has all things that contradict his wishes and beliefs, by pretending it doesn’t exist.

There’s fierceness in his decrepitude. If he can’t manage the stairs, he’ll slide down the banister. Though his head falls regularly to one side and his eyes will sometimes go dead and absent, he insists on ordering chateaubriand for breakfast in a voice that suggests God as a gourmand. There are also the cruel moments of recognition: of fear and acceptance, when he wraps his arms around himself and suddenly looks small and very cold. By the end, these accumulate into something like an epiphany.

Yet these scenes don’t erase the memory of the dance of the boyars that the captain performs for Kurt, as Alice plays the piano. It’s a furious, flustered performance, both heroic and pathetic, in which the captain seems to kick and punch at every dismal phantom in pursuit of him. These are not rehearsed steps. He’s making it up as he goes along, with all the vitality that’s left him. He is, to put it simply, staying alive.

By August Strindberg; in a new version by Richard Greenberg; directed by Sean Mathias; sets and costumes by Santo Loquasto; lighting by Natasha Katz; original music and sound by Dan Moses Schreier; technical supervisor, O’Donovan and Bradford; production stage manager, Arthur Gaffin; general management, Stuart Thompson. Presented by the Shubert Organization, Roger Berlind, USA Ostar Theatricals and Chase Mishkin. At the Broadhurst Theater, 235 West 44th Street, Manhattan.

WITH: Ian McKellen (Edgar), Helen Mirren (Alice), David Strathairn (Kurt), Anne Pitoniak (Maja), Keira Naughton (Jenny) and Eric Martin Brown (Sentry).