“I feel like I’m in a f—ing horror movie,” a soldier murmurs as gunfire erupts around him, and his words turn out to be a pretty accurate assessment of Michael Bay’s noisy, nerve-frying account of the widely contested 2012 terrorist attacks that claimed four American lives in Benghazi, Libya. Taking a break from the cultural atrocities of the “Transformers” franchise with this half-successful bid for seriousness, Bay approaches his tinderbox of a subject pretty much the way you’d expect from Hollywood’s most aggressively pro-military director: Largely avoiding the political firestorm in favor of a harrowing minute-by-minute procedural, “13 Hours: The Secret Soldiers of Benghazi” is an experiential tour de force but a contextual blur, a shrewdly dumb movie that captures, and perhaps too readily embraces, the extreme confusion of the events as they unfolded on the ground. Most of all, it’s a tribute to the brave U.S. fighters who kept a horrific situation from turning much worse, and it’s on that support-our-troops score — which propelled “American Sniper” and “Lone Survivor” to surprise-hit status — that this Paramount release will have its best shot at connecting with war-weary domestic audiences beyond Bay’s fan base.

Adapted by author and first-time feature scribe Chuck Hogan from Mitchell Zuckoff’s 2014 book (which was written with the surviving members of the Annex Security Team in Benghazi), “13 Hours” has already been described by Bay as his “most real movie.” As a dramatization of a deadly real-life ambush on U.S. forces, it’s certainly an improvement on, say, “Pearl Harbor,” even if it shares with that 2001 misfire a scene shot from the inhuman p.o.v. of a falling rocket. Indeed, many of Bay’s tics and tendencies are on worrying display even in the story’s opening stretch in the fall of 2012: Less than a year after the fall of Libyan dictator Muammar Gaddafi, tensions are running higher than ever in the perpetually war-torn port city of Benghazi, and “13 Hours” immediately thrusts us into the mayhem with hard-slamming edits and angry, agitated camerawork. The context may be a foreign one, but the muscular visual language is pure Bay; even a tense early standoff between two Americans and a Libyan militia has all the jacked-up macho swagger of a “Bad Boys” meet-cute.

The two Americans are former Navy SEALs and old friends, Jack Silva (John Krasinski) and Tyrone “Rone” Woods (James Badge Dale), private security contractors who have been tapped as part of the CIA’s Global Response Staff to protect U.S. intelligence operatives and diplomats in the city. The other ex-military men serving with the GRS in Benghazi are Mark “Oz” Geist (Max Martini), Kris “Tanto” Paronto (Pablo Schreiber), John “Tig” Tiegen (Dominic Fumusa) and Dave “Boon” Benton (David Denman), and while they are given only minimal character shadings — Boon is the bookish one, Tanto the frat boy, Silva the skilled newcomer, Rone the natural leader — the movie neatly limns the difficult personal circumstances that brought each of these men to this God-forsaken outpost, with Krasinski and Dale providing a sturdy dramatic anchor throughout.

Much as they long to return home to their wives and children (as captured in a few gooey flashbacks and video-chat montages), these men are born soldiers, trained to respond to sudden danger with quick-thinking professionalism and unflinching courage. Due to the unrest that has held sway in the region for centuries (only recent events are described in the opening titles), there are plenty of opportunities for bravery even before Islamic militants attack the U.S. diplomatic compound on Sept. 11, penetrating the building’s formidable defenses and setting a fire that will ultimately claim the lives of Ambassador J. Christopher Stevens (Matt Letscher) and Foreign Service information management officer Sean Smith (Christopher Dingli). Meanwhile, at the CIA’s Annex a mile away, Rone and his men are ready to respond but are ordered to wait in their vehicles by “Bob” (David Costabile), the top Agency officer in Benghazi, which almost certainly keeps them from reaching Stevens and Smith in time.

That delay was the most damning and controversial revelation in Zuckoff’s book, and Bay, never one to prioritize thought over action, offers a fairly blunt indictment of the bureaucratic thumb twiddling that kept a few good men from saving American lives. Wisely, this is about as far as “13 Hours” goes in pointing the finger of blame. There are a few vague nods to the lack of adequate security, preparation and response: the reliance on unarmed Libyan guards who quickly fled their posts, the realization that the Annex’s location isn’t nearly as classified as originally thought, and the grim discovery that the attacks were not spontaneous but premeditated. Still, the movie generally avoids trafficking in the conspiracy theories and partisan agendas that have turned the word “Benghazi” into a conservative battle cry against the Obama administration and then-Secretary of State Hillary Clinton. Whether due to lack of time or inclination (or perhaps the realization that the much-disputed Benghazi narrative calls for greater political nuance than “Transformers: Revenge of the Fallen”), Bay seems to have determined that simply dramatizing the details of the attack will be challenge enough.

It’s a challenge he accepts, but doesn’t always rise to meet, amid the frenzy of an unrelenting combat sequence that consumes most of the film’s 144-minute running time. Still, under the circumstances, that lack of clarity feels both deliberate and at times appropriate. Bay has a genius for incoherence, and this is one historic crisis that feels uniquely suited to his dubious talents: As the GRS soldiers make their way to the diplomatic compound and then back to the Annex, taking and dispensing heavy fire along the way, “13 Hours” all but revels in its own inscrutability. The men never know whether the Libyans approaching their compound or stopping their car might be hostiles or “friendlies,” and their unease is only exacerbated by lousy communication with U.S. forces back home and at another key base in Tripoli (400 miles away from Benghazi).

Scene after scene, the movie is an exhausting, pulverizing thing to experience, by turns immersive and continually disruptive. Every element of the filmmaking — from the jittery, rapid-fire cutting to the intensely saturated hues of Dion Beebe’s digital lensing, from the cacophonous, bullet-riddled sound design to Lorne Balfe’s equally percussive score — seems to push us out and pull us in with the same hectoring force. It’s a nail-biter and a head-scratcher rolled into one: The mind may initially race to keep up with logistics, but eventually one acknowledges the futility of trying to make sense of a situation that Bay himself hasn’t managed to clarify.

Really, it’s best to let “13 Hours” come at you like a piece of hyperkinetic abstract art, drenched in diesel, blood and testosterone. Beebe, doing his most striking handheld work since Michael Mann’s “Collateral” and “Miami Vice,” captures images of staggering brutality, but there’s an eerie seductiveness to his palette as well, from the regular use of night-vision footage to the sight of this still-beautiful beach city (played by a mix of locations in Morocco and Malta) lit up by fires and flares. Heroes and villains register as indistinct, dirt-caked blurs, and the orders and threats they bark at one another soon blend into an unintelligible background drone: the music of murder and military jargon.

To pause and think seriously about the situation at hand would short-circuit the overwhelming sensory effect that Bay and his collaborators are aiming for. It would also require a screenplay with a deeper understanding of the politics at hand (including the U.S.’ own murky role in the proceedings), and a willingness to put a more human face on the enemy. The aforementioned “American Sniper” and “Lone Survivor” also limited themselves to a soldier’s perspective, but they still invested their respective Middle East conflicts with more complexity and empathy than “13 Hours” extends to the Benghazi attackers; a visually striking scene of hijab-clad mothers mourning their fallen militants doesn’t really cut it. Other characters do occasionally register amid the tumult: The terrific Iranian actor Peyman Moaadi (“A Separation”) turns up as a friendly Libyan aide caught up in the horror, while French actress Alexia Barlier plays a defiant CIA operative whose chief narrative purpose is to exalt the heroics of those protecting her.

As one man rather needlessly points out during a moment of anxious downtime, Benghazi is essentially a 21st-century Alamo, and those are the sobering, reductive terms on which Bay’s movie presents itself. It’s no spoiler to note that two GRS soldiers — Rone and Glen Doherty (Toby Stephens), who arrived from his base in Tripoli on the morning of Sept. 12 — will soon perish in a mortar attack on the roof of the Annex. Their deaths, and the astonishing courage of their comrades, confer upon the GRS a nobility that is ambiguous and beyond reproach, and “13 Hours” solicits easy admiration by paying stolid, moving tribute to their sacrifice. Bay’s more generous critics may feel similarly inclined to honor a job well done. He may not have made a remotely great or definitive movie about Benghazi, but he’s surely earned a few points for good behavior.