From its opening montage, a brief history of Saudi Arabia, Peter Berg's

The Kingdom

zips at a lightning pace.

It's a Rambo-rousing tale, this story of an elite FBI squad that slips into the Mideast monarchy to investigate an attack on employees of a U.S.-owned oil firm.

Written by Matthew Michael Carnahan (whose Americans-in-Afghanistan tale, Lions to Lambs, arrives later this fall), the film - exciting to watch, if strenuous to parse - depicts Saudi Arabia as a kingdom built on shifting sands.

Its rulers are pro-American. Yet some of its citizens - including Osama bin Laden and 15 of 19 of the 9/11 attackers - are anti-U.S. zealots.

The covert FBI team dispatched to Saudi Arabia represents the American spectrum. There is Fleury (Jamie Foxx), the soft-spoken leader who works back channels like a virtuoso; Mayes (Jennifer Garner), forensic specialist and babe; Sykes (Chris Cooper), evidentiary pro and good old boy; and Leavitt (Jason Bateman), intelligence whiz and jokester.

In Riyadh they are assigned a Saudi minder, Col. Al Ghazi (Ashraf Barhom), who emerges as the most compelling figure. Gap-toothed, with formal English diction and humor drier than the desert, Al Ghazi is the Americans' moral and political guide, accustomed to reconciling the conflicting demands of the monarchy and extremist malcontents - and as scandalized by American profanity and slang as he is captivated by the FBI ops' energy and keenness.

The script's conceit is that Al Ghazi and Fleury, tender family men unflinching in the face of terrorism, are spiritual twins. In the kingdom of terrorists and clueless princes, Al Ghazi, like the Americans, believes in loyalty to family and nation.

Is it the filmmakers' intention to suggest through its principals that both Saudi Arabia and the U.S. both are nations where tradition and insurgency are in violent collision? Is the implication that these American patriots who circumvent their political system to collect intelligence are no different from the terrorists end-running their government?

The film proceeds at a clip, the close-ups so intrusive and extreme that you can count Foxx's eyelashes and Garner's freckles. What announces itself as a forensic thriller soon turns into a shoot-'em-up, with Al Ghazi fulfilling the function of the figure in a classic Western who joins the posse, replacing the beloved pal who died senselessly.

Propelled by The Kingdom's sheer velocity, I was with it for its thrilling first two acts. It doesn't hurt that the gallows humor humanizes the characters of the ensemble.

But as Berg builds to the climactic showdown between the FBI agents and those of an Al Qaeda-like cell, his dizzy-making camera work - handheld, as in the Bourne Ultimatum - is increasingly hard to follow.

Ultimately, this jingo-bingo action thriller squarely hits its target, then delivers a delayed-action message contrary to everything that has preceded it. Berg heroizes the plucky Americans, but in the closing scenes of his ripping action flick, sucker-punches them. It's as if this populist Syriana frags itself.

The Kingdom **1/2 (out of four stars)

Directed by Peter Berg. Starring Jamie Foxx, Jennifer Garner, Jason Bateman, Chris Cooper, Ashraf Barhom and Jeremy Piven. Distributed by Universal Pictures.

Running time: 1 hour, 50 mins.

Parent's guide: R (graphic violence, profanity)

Playing at: Area theatersEndText

Contact movie critic Carrie Rickey
at 215-854-5402 or crickey@phillynews.com. Read her blog, "Flickgrrl," at http://go.philly.com/flickgrrl/