“Sabotage” is a damn fine whodunit with a surprising layer of pathos and depth. Amazingly, it’s an Arnold Schwarzenegger movie. I can’t remember the last time a Schwarzenegger flick even had a plot.

Here he plays Breacher, the leader of a DEA commando team specializing in raids against drug cartels. His younger, more agile troops are seven muscle-bound guys and one banshee of a woman, a bullying, taunting crew of crazies. They handle most of the combat while Breacher crab-walks alongside, calls the plays and occasionally shoots somebody. He’s the Vince Lombardi of crash-and-kill operations.

He’s also the one who takes the heat when $10 million goes missing after his team tears up a cartel’s cash drop. As to why and how that happened, the movie keeps you off-balance and guessing. Also squirming, because just when the agency’s internal affairs watchdogs back off and the team goes back to work, they begin dying in spectacularly violent ways.

“Sabotage” comes from David (“Training Day”) Ayer, a specialist in cop melodrama who savors dark ambiguity and complication. The DEA unit’s tactics are not much different from the worst criminals’. There’s profane humor in the way they snap at each other — Dobermans at play — but post-traumatic stress nihilism, too. When they’re not taking murderous risks, they don’t know what to do with themselves.

After a few months on administrative leave, they’re holed up in a training barracks so squalid that Breacher calls it “a crack house.” After two of their own are gruesomely mutilated, they sink into hair-trigger paranoia. “We’re not a team,” says Monster (“Avatar’s” Sam Worthington, bulked-up and ugly), “we’re a gang.”

Enter Olivia Williams and Harold Perrineau as homicide detectives. Where Breacher’s team members bark at each other in military jargon, these street cops speak in a different vocabulary. They’re loquacious, skeptical, expert at sarcastic, needling small talk. Their rapport relieves what could have become a hysterical parade of carnage scenes. Their turf wars with the Feds add realism to the story’s gripping improbabilities.

Ayer crafts slick handheld sequences that put us beside the DEA team, prowling hallways with death around every corner. The finale, with a character in cowboy gear going on a suicide mission against a superior force of bad hombres, recalls the blistering slo-mo slaughter of “The Wild Bunch.”

Where his film excels, though, is in giving his characters a bit of substance. Williams, the rangy English actress who played Eleanor Roose­velt in “Hyde Park on the Hudson,” makes a great Georgia detective. She’s intelligent, experienced, used to giving orders. She’s a fair match for the gruff, Germanic Breacher, and their byplay becomes a key story element. Her full-bodied performance elevates the film above its pulp roots. So do the little touches. When Breacher is marooned on do-nothing desk duty during his investigation, he listens to Beethoven symphonies. Good one.