The title of Peter Berg’s movie refers to Saudi Arabia, and under the opening titles the picture offers a snazzy precis of the kingdom’s history. Unfortunately, that’s the film’s high point. Though it’s made with all the sheen and professional expertise one would expect of a piece produced by Michael Mann, “The Kingdom” not only features the irritatingly jerky, hand-held style preferred by Berg (see “Friday Night Lights”) but quickly degenerates from a serious topical tale about twenty-first century terrorism into a jingoistic gung-ho shoot-’em-up. If “United 93” had been directed by Michael Bay, it might have wound up something like this.

The linchpin of the plot is an event modeled after the 1996 assault on the Khobar Towers. Here a heavily-guarded community of American construction workers and their families in Saudi Arabia is the target of a terrorist bomb that kills a great many residents. Against the wishes of the State Department, the FBI insists on sending a forensics team to help the investigation—a cross-section quartet consisting of fast-talking leader Ronald Fleury (Jamie Foxx), brilliant good-old-boy site reconstruction specialist Grant Sykes (Chris Cooper), cocky jokester and computer wiz Adam Leavitt (Jason Bateman) and—of course—the svelte but tough female analyst, Janet Mayes (Jennifer Garner). Initially the Saudis keep the Americans on the sidelines, but despite the cultural differences Fleury builds a relationship of trust with their handler, police colonel Faris al Ghazi (Ashraf Barhom), and before long they’re knee-deep in the chase. And within the four-day window their superiors have allowed them, they go through hails of gunfire and car crashes—and foil an attempt by the terrorist cell to abduct and publicly execute one of their number—to track down the mastermind behind the slaughter.

There’s nothing inherently wrong with portraying the Saudi regime as insular and corrupt and the country as seething with discontent and anti-Americanism; as history shows, that portrait—while politically inconvenient—isn’t far from the truth. Where “The Kingdom” goes awry is in rewriting history to depict American agents not only as supermen who can catch the culprits even with their hands tied but the people who can instruct benighted foreigners, even in their own countries, on how to get the job done right. (Talk about C.S.I. on the fly.) Given recent U.S. experiences in these respects, Matthew Michael Carnahan’s script is certainly a national wish-fulfillment fantasy of the highest order, with an ending that has to be characterized as “happy” not only because scads of bad guys bloodily bite the dust (of which there is, of course, plenty in Saudi Arabia) but because no further Americans are casualties. (One Saudi ally is killed, but of course that can’t be considered the same thing.) And tagging on a coda which emphasizes the depth of the animosities and suggests, oddly, that this is a struggle that can only end in full victory for one side or the other leaves a weirdly unpleasant aftertaste.

Nonetheless one does have to recognize the virtues of “The Kingdom” as pure adrenaline-rush movie: the chases and gunfights in the last reels are mightily impressive as stuntwork and choreography, and they certainly satisfy the contemporary demand for exaggerated action. And the cast fulfill their stereotypical duties with thoroughgoing professionalism: one couldn’t ask for a smoother operator than Foxx, a more glib comic relief figure than Bateman, or a slicker female heroine than Garner, and though it’s almost painful to see somebody as talented as Cooper stuck with such a one-note part, he hits it straight-on. And could anybody play a smarmy State Department type better than Jeremy Piven? It’s not far removed from his Hollywood agent on “Entourage,” but still fills the bill. Barhom, meanwhile, does the sympathetic Saudi bit very nicely. Technically the picture is top-notch, though that hand-held camerawork (by Mario Fiore in this case) has become a tiresome cliché; the location choices, divided between Arizona and Abu Dhabi, are excellent, and the score—an uncharacteristic one from Danny Elfman, who usually works on films that are fantastical in ways different from this one—is fine.

But all the high craftsmanship is lavished on a project that ultimately comes across as a rather tawdry use of real-life tragedy for too-easy action-movie satisfaction—sort of like “Déjà vu” without the sci-fi accouterments but no less unrealistic for that. It may hit its target, but given the subject, it aims way too low.