“Hacksaw Ridge,” Mel Gibson’s latest high-minded cinematic massacre, tells the story of Desmond T. Doss, a God-fearing American pacifist who served as a combat medic during World War II and personally carried 75 wounded soldiers from the Battle of Okinawa, ultimately becoming the first conscientious objector to receive the Medal of Honor.

His journey straddles two war zones — the first a largely psychological one, in which Doss endures the scorn and harassment of his fellow soldiers, and the second an intensely physical one, atop a treacherous 350-foot escarpment that gives the movie its title. Steeped in blood, guts and Christian iconography, “Hacksaw Ridge” is a tribute to one man’s courageous adherence to his deepest beliefs, made by a director whose commitment to his aesthetic principles is no less unswerving.

As he did in “Braveheart” and “The Passion of the Christ,” Gibson equates spiritual virtue with a hellish corporeal endurance test. His favorite subject is the testing and purification of a man’s moral mettle — a goal that can be achieved only through a sickening, uncompromising display of brutality.

His new film differs in that its hero nobly refuses to participate in the slaughter. Unlike William Wallace — or Jaguar Paw, the warrior protagonist of Gibson’s previous film, “Apocalypto” — Doss has sworn a sacred vow that he will never use a weapon. And unlike the flayed and battered Jesus we meet in “The Passion,” Doss does not personally endure the bulk of all that digital and prosthetic carnage.

He is an altogether unique kind of hero: a healer, a witness, a patriot and a pacifist. His commitment to nonviolence is established in the first 15 minutes, when, as a spirited young boy (played by Darcy Bryce) growing up in the Blue Ridge Mountains of Virginia, he strikes and almost kills his brother, Hal, with a brick.

That near-fatal mishap brings Desmond to a powerful, almost Damascene moment of reckoning, one that Gibson dramatizes with anguished close-ups, swelling music and a heavy-handed reference to Cain and Abel. By the time we see a grown-up Doss in 1942, with the American war effort in full swing, he is a changed man — quite literally, as he’s now played by Andrew Garfield, whose reedy physique and gawky charm immediately cast him as an unusual kind of soldier.

A Seventh-day Adventist who refuses to bear arms, Doss nonetheless longs to serve his country and enlists in the Army — though not before falling in love with a pretty nurse, Dorothy (Teresa Palmer), whom he pursues with the same cheerful, ingratiating stubbornness that characterizes his every decision. He doubtless inherited some of that iron will from his father, Tom (Hugo Weaving), a scarred, embittered World War I veteran who regularly erupts in fits of drunken abuse at his children and their long-suffering mother, Bertha (Rachel Griffiths).

As a filmmaker, Gibson has a certain genius for the familiar: Even when tackling ancient settings and foreign dialects, his command of the Hollywood blockbuster idiom is such that all cultural differences are effectively rendered nil. That’s very much the case with “Hacksaw Ridge,” a thoroughly American concoction (despite all the top-notch Australian and British acting talent) that eases before long into the sturdy, straightforward rhythms of the platoon picture.

The men Doss meets at boot camp are a predictable mix of tough guys and comic archetypes, none funnier than than a barking drill sergeant wittily played by Vince Vaughn as a benign riff on Gunnery Sgt. Hartman from “Full Metal Jacket.” All these soldiers — including a surly alpha dog, Smitty (Luke Bracey), and a steely commanding officer, Capt. Glover (Sam Worthington) — turn on Doss when they learn he has no intention of touching a rifle. Yet even as he faces accusations of cowardice and enormous pressure to drop out, Doss doubles down on his training, as well as his belief that an important destiny awaits him in Okinawa.

In reconstructing one of the Pacific theater’s deadliest conflicts, “Hacksaw Ridge,” to its credit, seeks to strike a balance and honor the fighters whose courage made Doss’ valor possible. For lengthy stretches of Andrew Knight and Robert Schenkkan’s script, we are not with Doss at all but instead with his comrades in the heat of battle — charging, shooting, stabbing and immolating an equally vicious enemy.

Gibson, who has few contemporary equals when it comes to dramatizing violence on-screen, lavishes loving attention on the sight of bullets ripping through flesh, of bodies being blown in two and limbs being torn off. These moments have none of the clean, cauterized efficiency that characterizes most scenes of large-scale warfare. When it comes to showing that war is hell, the opening sequence from “Saving Private Ryan” may still be the gut-clutching gold standard, but for pure virtuosic sadism, Gibson has Steven Spielberg clearly beat.

All this stunning if conventional action-movie technique — the agile yet steady camerawork, the theater-rattling sound design, Rupert Gregson-Williams’ loudly hemorrhaging score — serves to offset the film’s one genuinely radical element, which is Doss himself. Rushing into the breach armed with only his medical equipment and his Bible, he is neither a passive figure nor an active participant, and Garfield, always a wonderfully empathetic screen presence, goes about as far as any actor could to illuminate that particular quandary.

Doss’ eyes register the horror of the barbarism and hellfire all around him, even as his legs, working like pistons, propel him nimbly across the battlefield to tend to the injured. Even when the fighting ceases, he keeps working, tirelessly and ingeniously, to find his fallen comrades and return them to their encampment below the ridge. By the time he sends down a few wounded Japanese soldiers (whose fate unsurprisingly becomes a grim punchline), something strange yet undeniable has taken place. Doss is no longer embodying the film’s moral position; he’s actively rebuking it.

I’m loath to suggest that a filmmaker as enthralled by screen violence as Gibson clearly is could never make a great movie about a pacifist hero. A different artist might well have found something madly compelling in that paradox, and there are moments when “Hacksaw Ridge,” with its unwieldy blur of compassion and carnage, seems to be stumbling in that direction. But Gibson’s attitude toward the killing he shows us goes beyond the usual parameters of unsparing realism; it’s positively exultant. Violence seems less a necessary evil than the fuel for some warped personal addiction.

At every turn, Gibson wields his old-fashioned classical style like an airbrush, glossing over the complicated, fascinating questions that Doss’ position naturally invites. How does this indisputably brave, self-sacrificing individual feel about the fact that his survival depends, in no small part, on the violence of others? What are we to make of the Christian soldiers who don’t share his qualms about killing? The staging of one key scene, in which a wounded Doss is hoisted heavenward on a stretcher, is hardly the only moment in which Gibson seems to separate the great unwashed from the true believer in their midst.

The image of a lone maverick soldier, finally exalted after having been persecuted and misunderstood by his peers, might well trigger scornful responses from Gibson’s harshest critics. But the tone of “Hacksaw Ridge,” arriving a decade after the personal meltdown that derailed the director’s career, doesn’t feel angry or defensive. And if his unusually self-effacing public appearances have been any indication, this is Gibson’s hat-in-hand moment — his attempt to appeal to his own better angels, as well as those of the audience and the industry, with a sober reaffirmation of his talent.

Humility becomes Gibson. But he is ultimately no more capable of denying his deepest-held convictions than Desmond Doss was, and it’s hard to watch this mightily impressive, morally incoherent spectacle without sensing that its contradictions reflect something irresolvably true about its maker. Gibson has made a movie that is somehow both deeply dishonest and crushingly sincere — and still at war with itself, long after the final shot has been fired.