fish-out-of-water procedural, half revenge film, Peter Berg’s The Kingdom is essentially a glowering remake of Beverly Hills Cop that works quite well whenever it’s de-emphasizing theme in favor of narrative convention. Exploiting Western/Saudi hostility for investigative suspense and one prolonged, expertly staged action sequence that ably blends the ground-level ferociousness of a Michael Mann gunfight with the precisely choreographed killing box set piece from Philip Noyce’s Clear and Present Danger, the film is almost comfortable in its B-movie getup; aside from a portentous (though justifiably celebrated) opening credit sequence and a too-tidy denouement, The Kingdom is admirably content with being nothing more than an action flick set against grim political realities.

Given the potential volatility of the premise, which concerns a vengeful FBI task force bullying its way into Saudi Arabia to catch a terrorist suspected of killing on of their own (and, not for nothing, over 100 American oil company employees), one expects Berg and screenwriter Matthew Michael Carnahan to err on the side of political correctness. But they unabashedly depict the Saudi authorities as beholden to the oil rich royals and indifferent to the Islamist extremists who view the murder of Americans as a literal one-way ticket to paradise. One or two enlightened officers aside, Berg and Carnahan essentially carry off a broad-stroke demonization of the entire country; theoretically, what they accomplish isn’t that far removed from the depiction of injuns as bloodthirsty savages in the western serials of the 1930s and ’40s.

Most of this is inferred due to the irrelevance of average Saudis to Carnahan’s narrative; the audience sees this world through the eyes of FBI agents, and the Saudi authorities see to it that their gaze is never cast far beyond the American oil workers’ compound. The interloping feds are headed up by Ronald Fleury (Jamie Foxx, who deftly integrates his smooth-talking persona with his no-bullshit Ricardo Tubbs turn from Miami Vice), and it’s his job to stray over the line as far as possible without getting his team kicked out of the country. Accompanying Fleury are demolitions expert Grant Sykes (a gregarious Chris Cooper), techie Adam Leavitt (Jason Bateman doing Jason Bateman, and, thankfully, doing that well), and female Janet Mayes (a dowdily desexed Jennifer Garner) – all of whom are motivated by a personal connection to one of the slain feds (Kyle Chandler, whom you should know as Coach Eric Taylor from NBC’s Friday Night Lights*).

This undercurrent of revenge is forever threatening to shake apart the barely-maintained cordiality between Fleury’s team and their Saudi supervisors, one or two of whom are quietly sympathetic to their cause (including their primary liaison Al Ghazi, played by Paradise Now‘s Ashraf Barhom). Recognizing this, Fleury keeps scrambling for common ground as his officers pour over the barely examined crime scene – because unless he finds a way to get out into the nearby, and incredibly off-limits, housing complex where they suspect the terrorists to be holing up, Fleury knows there’s no chance of bringing the mastermind of the attack to justice (or, if Fleury had his druthers, killing the shit out of him).

It’s impossible to not view this frustration as a microcosmic dramatization of the United States’ inability to get at the true source of Islamist terror, but Berg wisely refuses to burden his efficient little action film by overtly connecting the two (which is why the final line of the film is such a ham-fisted disappointment). The Saudi’s official obfuscation is simply a means to set up the rollicking finale, where Fleury and company are drawn out into the mean, and decidedly anti-American, streets of Riyadh in order to rescue the kidnapped Leavitt. Stretching from an impressively staged highway assault (right out of the Michael Bay playbook) to a masterfully sustained bit of door-to-door urban warfare, the entire sequence is an immensely satisfying payoff for the by-the-numbers procedural setup of the first two acts. Though the film has firmly established itself as much too Hollywood to subject Leavitt to a fate as gruesome as a videotaped beheading, the very idea of wanting to kill Jason Bateman is more than enough to infuriate any right-minded viewer (it’s also gentlemanly of Berg to reward Garner for her character’s one-dimensionality by letting her perform a brutal coup de grace on one of the terrorists).

The Kingdom does have its American irritants: there’s an ineffective Attorney General (Danny Huston, in another arrogant bureaucrat turn), and a glad-handing U.S. diplomat (Jeremy Piven doing Jeremy Piven, and, unfortunately, doing that well past its expiration date). Still, Berg and Carnahan mostly keep their attentions fixed on the threat of Islamism. But while they may be subtly aiming to refocus Americans’ sense of the Global War on Terror (in that Iraq continues to be the biggest, bloodiest and most wasteful sideshow in U.S. history), the film’s primary reason for being lies in that raucous third act. Audiences might as well have fun while the world goes to hell.

7.0 out of 10

*Also cameoing from Dillon, Texas: Minka Kelly, who plays the hottest kindergarten teacher in the history of time.