You have to choose your focus very carefully to make a triumphant film about the U.S. entanglement in Afghanistan. Kathryn Bigelow managed it in “Zero Dark Thirty,” but that was really an oblique take on a war which, to put it mildly, has not gone terribly well.

In “12 Strong,” Jerry Bruckheimer and his cohorts have solved the problem by concentrating on the very first U.S. military action in response to 9/11, one that was an unambiguous success—the liberation of the Taliban-controlled city of Mazar-i-Sharif in the fall of 2001, which crippled the government’s ability to control the country and provide safe haven for al Quaeda, encouraging the flight of the Taliban (and al Quaeda) leadership to neighboring Pakistan and giving the U.S. the opportunity to craft a workable regime in its place. You might say that the opportunity was missed, since it did not lead to the annihilation of either al Quaeda or the Taliban, both of which survived and currently seem on the ascendant again, or to the establishment of a stable government in Afghanistan. But in isolation the victory of a small Special Forces company in collaboration with fighters from the anti-Taliban Northern Alliance was unquestionably a remarkable achievement.

Scripters Ted Tally and Peter Craig, using a book by Doug Stanton as their source, begin with a prologue introducing the three main members of ODA 595, the team that eventually accomplished the near-impossible. Handsome Captain Mitch Nelson (“Thor” star Chris Hemsworth) has just applied for a desk job and must pressure his new superior Lt. Col. Bowers (Rob Riggle, who, huff and puff as he might, can’t escape the feel of a comedian trying, none too successfully, to act) to return him to his old unit. In this he’s aided by his crusty Chief Warrant Officer Cal Spencer (Michael Shannon), and welcomed back by Sergeant Sam Diller (Michael Peña), who had taken offense at his departure.

The team has other members—Sergeant Ben Milo (Trevante Rhodes), Sean Coffers (Geoff Stults), Vern Michael (Thad Luckinbill), Fred Falls (Austin Stowell), Scott Black (Ben O’Toole), Pat Essex (Austin Hébert), Kenny Jackson (Kenneth Miller), Bill Bennett (Kenny Sheard), and Charlie Jones (Jack Kesy). But most—with the exception of Milo, whose relationship with a young Afghan boy assigned to protect him gets a lot of screen time—are relegated pretty much to macho banter and brief exhibitions of standard-issue heroism.

After Mitch’s company is chosen for the operation over competing units by Col. John Mulholland (William Fichtner), they’re flown by helicopter to link up with the forces of Northern Alliance warlord Abdul Dostum (Navid Negahban), a fierce warrior whose trust Nelson must win in order to give the already precarious mission a real chance of success. Among the abilities the men will have to demonstrate is horsemanship, since the Afghans ride into battle on noble steeds and the Americans will have to do likewise, though the enemy forces—led by a swarthy, glowering mullah (a one-note turn by Said Taghmaoui) who is introduced executing a woman for the crime of educating her daughters, have modern weaponry, including tanks and mobile rocket launchers.

Of course, Dostum is pleased at Nelson’s ability to call in airstrikes, but more impressed by the captain’s willingness to put himself in harm’s way to do so with surgical precision, and by the zeal the American “horse soldiers” demonstrate in battle. He’s gradually won over, and after a climactic confrontation with Taliban forces is even willing to set aside his differences with another commander to keep the Northern Alliance together. That doesn’t mean, of course, that he’s not determined to take personal vengeance against the mullah.

All of this is portrayed in a simplistic fashion reminiscent of World War II propaganda movies, though there are also echoes of old-fashioned Hollywood westerns. (You might compare it to pictures made about the 1942 Doolittle Raid on Tokyo—like 1944’s “Thirty Seconds Over Tokyo,” an accomplished morale-booster.) There’s very little nuance to be found here, in either the characterizations—this is the debut feature of director Nicolai Fuglsig, and subtlety does not appear to be his forte—or the elaborate battlefield recreations, which use the New Mexico locations well enough, but are very often logistically confused. In this regard Rasmus Videbaek’s cinematography is fine, but Lisa Lassek’s editing not always ideally clear.

As to the cast, Hemsworth, as you might expect, makes a stalwart hero, and though Shannon is more restrained than usual (a fact only partially explained by the fact that Spencer is laid up with a bad back for much of the mission), his crustiness is apt. Peña brings his usual energy to Sergeant Diller, but neither he nor Rhodes offers much beyond generalized macho in their roles. The rest of the ensemble is solid, given the modest opportunities afforded them—Fichtner, for example, seems to be having fun playing a hard-as-nails commander—but the outstanding supporting turn surely comes from Negahban.

While Neghban is very good, however, the script’s portrayal of Dostum certainly smooths out the rough edges. The warlord is depicted as gruff but basically principled in his own way. In reality Dostum is one of Afghanistan’s most ruthless and treacherous figures. One would never know from the film, for example, that he had fled the country after the Taliban takeover of Mazar-i-Sharif in 1998, and returned only in 2001, or that has been repeatedly accused of mass killings of civilians and prisoners. Though the picture closes with the information that he became vice president in the American-backed government of Ashraf Ghani in 2014, moreover, it does not mention that in 2017 he was alleged to have abducted and brutalized a political rival, or that, confronted by a possible investigation of the charges, he fled to Turkey, where he still apparently resides. He is, in short, a much more complex and enigmatic figure than one would imagine from his portrayal here.

On the other hand, Dostum is given the sole speech in “12 Strong” that exhibits realpolitik: he talks about how people frequently change sides in Afghanistan, and how one’s ally today might easily be a bitter enemy tomorrow. It’s a prescient moment that stands out in a film that, in its desire to laud the heroism of this small band of Americans in Afghanistan, ignores the overall reality of that conflict, which, after more than sixteen years, seems to have become yet another sad episode in the history of a land often called the graveyard of empires.