From the man-on-the-run kineticism of the “The Bourne Ultimatum” and “The Bourne Supremacy” to the doomed heroics of “United 93,” the British director seems fascinated by men driven to the brink.

So, there was probably no better choice to tell the Hollywood story of Richard Phillips, the captain of the Maersk Alabama, who was hijacked by Somali pirates in 2009 before being rescued by Navy SEAL snipers.

And with “Captain Phillips,” Greengrass doesn’t disappoint, injecting the story with a sense of nervous energy and creeping claustrophobia. The movie manages to be both tense and suspenseful, even though the world knows how it ends.

The film starts in a dusty, barren Somalia where we meet Muse (Barkhad Abdi), thin as wire and tough as a tire iron. He’s one of several young Somali men responding to a call for volunteers to help commandeer commercial ships making their way through the Gulf of Aden. He quickly shows himself to be a leader, standing up to some of the other, more aggressive volunteers.

Meanwhile, Phillips (Tom Hanks) is home in Vermont getting ready to leave for another day at work — though his job is several thousand miles away. He says goodbye to his wife (Catherine Keener) and heads off into what will turn out to be his place in history.

Hanks plays Phillips with a laconic, New England stoicism and perhaps it’s that style that helped the captain deal with not only sometimes trigger-happy pirates but an anxious, frightened crew. It also works as counterpoint to the equally determined if more unpredictable and fiery Muse, wonderfully played by Abdi in his first major acting role.

Ultimately, “Captain Phillips” is a test of wills between two men, both of whom just want to make it to another day, get back home, and not turn the Alabama into their tomb.

Predictably, the pirates don’t have their back stories filled in as much as Phillips. Somalia’s de-evolution into the chaos that sparked so many men to take up the gun of piracy could fill several movies.

Yet Greengrass does manage to humanize the pirates without celebrating their actions. Each of the four has a distinct personality, ranging from the impulsive Najee (Faysal Ahmed) to the shy Bilal (Barkhad Abdirahman), who seems torn about what he’s doing.

“Captain Phillips” is also impressive from a technical standpoint, as it moves from the expanse of the high seas — the scenes of the pirates on their small boats storming the massive Alabama are electric — to the walled-in feeling inside the ship and, finally, the lifeboat.

Greengrass, working from a script by Billy Ray (“State of Play,” “The Hunger Games”), deserves credit for taking a news story and breathing the life of art into it.