The Town

“The Town” proves that “Gone Baby Gone” was not just a Ben Affleck fluke (or a Ben Affluke, as the kids call it). The actor and erstwhile punchline has now directed two Boston-set crime dramas that demonstrate his confidence and skill as a filmmaker. Plenty of actors perform in dozens of movies without ever absorbing much expertise from their directors, but Affleck is not one of them.

He can still act, too! In “The Town,” based on Chuck Hogan’s novel “Prince of Thieves,” Affleck plays Doug MacRay, a lifelong criminal in the Charlestown area of Boston. This neighborhood is known for producing criminals — particularly robbers of banks and armored cars — at an alarming rate, skills passed from father to son as part of the local heritage. Doug’s mom disappeared when he was young; his father (Chris Cooper) is in prison.

Doug and his lifelong best friend Jim Coughlin (Jeremy Renner) have pulled several moderately successful heists, their crew rounded out by a couple of greasy-looking hoodlums named Albert (the one-named Slaine) and Desmond (Owen Burke). But while Jim is becoming increasingly violent and erratic, Doug is trying to scale it back. He attends Alcoholics Anonymous meetings. And after striking up a romance with a neighborhood girl named Claire (Rebecca Hall), he thinks he might want out of this lifestyle altogether.

The problem, as you know if you’ve seen the trailer — and which is revealed in the first few minutes of the film anyway — is that Claire was the manager at the last bank Doug & co. robbed. They wore masks and she never saw their faces, but still. This is the sort of romantic entanglement that makes hotheads like Jim nervous.

Adding to Jim’s jitters is FBI agent Frawley (Jon Hamm), a resolute, no-B.S. type who always, one gathers, gets his man. “The Town” keeps us in touch with both sides of the law, and there’s as much thrill in seeing Frawley track down clues in pursuit of the bank robbers as there is in seeing the bank robbers evade him. A fantastically staged car chase later in the film splits our allegiances even more, as we’re unsure whether we want the hunters to catch their prey or not. With a butt-kicking hero like Jon Hamm on one side and a rough but earnest Ben Affleck (plus and insane Jeremy Renner!) on the other, whom do you root for?

Just as he did in “Gone Baby Gone,” Affleck paints a real sense of place with Charlestown. Colorful characters played by the likes of Blake Lively (skanked up) and Pete Postlethwaite (who always looks like that) give it a gritty authenticity.

Stories about cops and robbers tend to fall back on clichés, and “The Town” is no exception. (The screenplay was written by Affleck, Peter Craig, and Aaron Stockard.) The crooks have unlimited access to police uniforms and other useful disguises; one guy’s recklessness threatens to sink the whole operation; another guy wants to do One Last Job before going straight; you know the routine. In terms of story, this really isn’t much different from the exceedingly generic “Takers” from a few weeks ago — except that “The Town” uses the tropes with greater finesse. It’s pulpy B-movie material, but it’s a well-acted and respectable grown-up version of it.

B (2 hrs., 9 min.; R, pervasive harsh profanity, brief nudity, brief strong sexuality, moderate violence.)

SHARE