Like his excruciating, but in many ways vital, United 93, Paul Greengrass's latest film, Captain Phillips, is a nimble, procedural look at a real-life moment of terror and crisis. Here a deeply committed Tom Hanks plays Richard Phillips, the captain of the Maersk Alabama, the massive container ship that was hijacked by pirates off the coast of Somalia in 2009. We watch as the hijacking and subsequent rescue efforts unfold, filmed with Greengrass's sober but propulsive vérité style, anchored beautifully by the quiet force of Hanks's admirably unshowy performance.

Though, this isn't a one-sided story. Greengrass and screenwriter Billy Ray, working off of a book written by Phillips with author Stephan Taity, also take us to the bombed-out desert shores of Somalia, where we first meet the young and ambitious head pirate Muse, played with natural ease by newcomer Barkhad Abdi. Muse and his scraggly, but heavily armed, young comrades are all desperate for this dangerous work; it's not only a way to make a lot of money for the violent local warlords and a little for themselves, but to gain status within the community, to rise up out of the anonymity of poverty. So our ostensible enemies are certainly not without their humanity. These are people, doing what they think they need to do to survive, and possibly even thrive.

Juxtaposing the Somalis' extreme plight, we first see Phillips at his comfortable New England home with his wife (Catherine Keener), then driving to the airport and fretting about his listless teenage son. Phillips is smart and compassionate, but he demands hard work, there's a simple efficiency in his world that, if employed calmly and properly, will win the day. He's strict with his crew, exacting about the length of coffee breaks and running drills. In Hanks's hands, Phillips exudes a rumpled authority, and when he first spots danger in the form of two skiffs in the distance making a beeline for the ship, we are impressed, reassured even, by his proficient command. Greengrass films with a wandering camera, though nothing feels arbitrary or chaotic for chaos's sake. His documentarian gaze deftly avoids sensationalism and goes right for the real-world terror of the ordeal; when the pirates finally do board despite the crew's best efforts, the ensuing clatter and frenzy is riveting in its urgency and its clarity. The potential danger is always felt, even if we already know how the story is going to end.

Phillips cannily stalls the pirates as they search for the crew, who employ their own brave, pragmatic, workmanlike maneuvers to keep themselves, and the ship, safe. Jittery on khat leaves and speaking in broken English, Muse and his three mates insist that no harm will come to Phillips or his crew if they simply comply and don't pull any tricks. Muse is careful to insist that they're not al-Qaeda; they have no interest in slaughtering Westerners, they just want the money that Maersk's insurance company will pay in ransom. This is what passes for business for these eager young men, a sad fact that Greengrass delicately contemplates before resuming the film's swift pace and taking us to the next stage of the ordeal. His chief goal to keep his crew safe, Phillips winds up a hostage in the ship's bright orange, space shuttle-looking lifeboat, the pirates making their way toward Somalia with the hope of at least ransoming the captain. (It's stressed that certain doom will befall them if they return home empty-handed.)

Thus begins the film's most grueling, nerve-wracking stretch, a perhaps just slightly overly long standoff waiting game that grows grimmer with each passing virtual hour. Phillips tries to reason with these frightened, desperate young men as subtly as he can, helping dress a wound and speaking to Muse man to man. But the tension in the bobbing, cramped container is too high, everyone's nerves too frayed to listen to reason. We in the audience are at least comforted, and stirred, as we watch the Navy put together its rescue operation, another brisk mission orchestrated by highly competent men and women. Greengrass has an obvious respect for these masters of process, but the film is never fawning or hyped-up. These people are just doing what they do, which they can do because they are from a very rich country. That's not a heavily stated observation, but it's there in every layer of bulky military garb contrasting the relative rags of the pirates, the boats bristling with guns dwarfing the flimsy skiffs used in the initial attack. This is Goliath vs. David, though David is certainly not the hero here.

That's a strange and unpleasant sensation, rooting for the side with all the money and firepower behind it. But the film is not didactic about these socioeconomic realities. It's simply honest about the scope of the situation, and keen to the humanity of all involved. When the film does reach its harrowing, shattering conclusion, and Phillips finally gives in to the horrific emotional ravaging he's been subjected to for days, the film reveals itself as a rousing study of endurance, a survival tale about a practical man who was remarkably able to keep himself together until it was OK to let go. Hanks is heartbreaking in these final scenes, possibly in part because it's lovable old Tom Hanks suffering so, but mostly because Phillips has been so controlled and seemingly self-possessed throughout this nightmare that his ultimate release is breathtakingly cathartic.

A fascinating examination of crisis thinking, and a somber if glancing look at a particular geopolitical issue, Captain Phillips is also, by picture's end, a carefully drawn and subtly executed paen to the human spirit. That may sound corny to you, but in the film's measured and thoughtful world, the human spirit is simply another clearly and thrillingly stated fact.