Can a period film titled “Beirut” offer anything but a maelstrom of godforsaken conflict? Yes, to a degree. Jon Hamm delivers a career-reviving performance, riding a roller-coaster character arc as a disillusioned former diplomat in crisis. While the larger issues underlying Lebanon’s endless 20-sided tug of war are as hopeless and half-intelligible after the film as before, the human issues of its core story move along crisply.

The action begins in 1972, when the various fuses ignited by the PLO, Israel, Christians, Muslims, divided factions of the U.S. government, Lebanese militias and Syria had not yet triggered the nation’s violent, 15-year-long civil war. Hamm’s character, Mason Skiles, is a valuable fixer for the U.S. embassy in those early days. He has the personal and political smarts to host wide-open cocktail party receptions at his mansion-like residence without sparking fights. At heart, he’s an idealist, willing to take a needy street urchin into his family because it’s the right thing to do. With a winning smile and a born negotiator’s skill, he is the American go-to guy for fending off bedlam.

Will you be surprised to learn that those relatively good times don’t last? A tragedy in his home drives Skiles from Lebanon and out of the foreign service. We find him in Boston a decade later, reduced to negotiating petty contract disputes between union leaders and bosses. His hours away from the bargaining table are spent drinking alone until completely tipsy.

Unexpectedly, he finds himself much in demand to deliver a speech at a university in Beirut. The fee is high, the flight from gray Massachusetts to the sun-bronzed Mideast is alluring and the offer is a trap. Skiles is drawn back into the region’s chaos. His old embassy colleague Cal (Mark Pellegrino) was taken hostage by insurgents, the fictional Militia of Islamic Liberation, who will speak to no one except Skiles. The CIA wants Cal back, partly to preserve his life, but mostly to ensure that he doesn’t blurt out state secrets.

With mazelike plotting on all sides, Skiles finds himself like a mouse pursued by multiple cats with razor-sharp claws. Will he pull himself back together and complete the mission without shooting or fighting, simply talking? Skiles tackles the crisis like the Jaws of Life at a demolition derby, working intently only to be T-boned by more out of control vehicles. Here Hamm has a meaty role as a hero without a gun, a part that proves he’s not only a movie star adored by the camera, but a talented film actor.

“Beirut’s” screenwriter and producer Tony Gilroy handles the ticking-clock tension well. He is as comfortable with complex suspense stories as Aaron Sorkin is to dialogue-driven political drama or Judd Apatow is to modern comedy. Gilroy knows how to wring the best out of a milieu that has been strip-mined to the verge of exhaustion, his contributions being usually sensational, and sometimes just so-so. His latest is somewhere in between.

It delivers the sharply sketched character studies Gilroy featured in his corporate thriller “Michael Clayton” and his scripts for the first three Bourne films. He introduces Rosamund Pike as a “cultural attaché” for the U.S. embassy (yeah, right) and wisely avoids the distraction of a forced romantic subplot. Rather than the usual feminine eye candy, she is a hard-as-nails professional, less of a skilled manipulator than Skiles, but in some important ways more than his equal. It’s interesting to see them interact not with intimacy but wary professional admiration, watching each other to see who’s playing a double or triple game.

That said, this is not at the top rank of Gilroy’s work. There is a second-act surprise that will not astonish anyone who is paying attention, tricks that are not so tricky, evil characters several shades more villainous than needed and scant attention to Lebanese people in a film about Beirut. Director Brad Anderson (who hasn’t worked much in film since 2008’s Eurasian noir “Transsiberian”) doesn’t make the story’s terrorist world especially persuasive. The most moving and memorable footage here, it must be said, is newsreel footage from the Lebanon War.

Gilroy deserves better. We do, too.