NEW YORK –– Any film whose advertising campaign features male characters dressed in nuns’ habits and sporting gruesome Halloween masks while toting automatic weapons has a long way to go to overcome the natural misgivings of Catholic moviegoers.

Despite a seriously intended and morally weighty script, director and co-writer (with Peter Craig and Aaron Stockard) Ben Affleck’s seamy heist drama “The Town” (Warner Bros.) fails to clear that hurdle, burdened as it is by excessive violence, gritty — though fleeting — sexuality and consistently foul-mouthed dialogue.

Set in the insular Irish-American underworld of Charlestown, Mass. — the bank-robbery plagued burg of the title — and adapted from Chuck Hogan’s 2004 novel “Prince of Thieves,” this is the story of failed pro hockey player-turned-thief Doug MacRay (Affleck). As demonstrated during the caper portrayed in the opening scenes, Doug is by far the most humane member of a so-far successful gang of careful and pitiless thieves who target the area’s armored trucks as well as its bank vaults.

Despite a seriously intended and morally weighty script, director and co-writer (with Peter Craig and Aaron Stockard), Affleck’s seamy heist drama “The Town” (Warner Bros.) fails to clear that hurdle, burdened as it is by excessive violence, gritty – though fleeting – sexuality and consistently foul-mouthed dialogue.

As demonstrated during the caper portrayed in the opening scenes, Doug is by far the most humane member of a so-far successful gang of careful and pitiless thieves who target the area’s armored trucks as well as its bank vaults.

Doug’s friend since childhood and cohort in crime, Jem (Jeremy Renner), by contrast, seems to enjoy violence for its own sake. A dangerous loose cannon, Jem beats one counting-house employee bloody with the butt of his gun before taking manager Claire Keesey (Rebecca Hall) as an impromptu hostage during the team’s escape. Fearing that Claire, whom they quickly release, may be able to identify them, despite their disguises, the crew assigns Doug the task of stalking her.

Instead, the unwitting Claire strikes up a conversation that eventually leads to romance with her erstwhile captor. But the genuinely smitten Doug’s hopes for a return to decency and a future life with his new love are hampered by the relentless pursuit of FBI agent Frawley (Jon Hamm) – whose intense focus on bagging the bad guys makes him less than scrupulous about observing the law – and by the machinations of ruthless local crime boss Fergie (Pete Postlethwaite).

Along the way to the subsequent hold-up that sees his squad don those jarring nun costumes, Doug beds Claire after what they both seem to consider a decent interval. Though their encounter is relatively discreet, an earlier scene of purely animalistic relations between Doug and Jem’s drug-addled, slatternly sister Krista (Blake Lively), though not prolonged, is distastefully explicit.

The film contains considerable gunplay and some bloody beatings, brief graphic nonmarital sexual activity, glimpses of upper female and partial nudity, pervasive rough and crude language and irreverent imagery. The Catholic News Service classification is O – morally offensive. The Motion Picture Association of America rating is R – restricted. Under 17 requires accompanying parent or adult guardian.

Mulderig is on the staff of Catholic News Service. More reviews are available online.