Like films such as I Went Down, Perrier's Bounty and In Bruges, all of which also starred the splendid Brendan Gleeson, The Guard is about characters who are easy to underestimate -- men who have hidden depths of knowledge and feeling, of humor and courage. Like In Bruges, The Guard is written and directed by a McDonagh -- in this case, John Michael McDonagh, instead of his brother, Martin.

But the important thing is that it has Gleeson, an actor who never seems to run out of ways to surprise an audience.

He plays Sgt. Gerry Boyle, a small-town cop in rural Ireland who drinks a little too much, dabbles in drugs, is something of a bully -- the ultimate big fish in a little pond. Very little fazes him -- even a dead body found in both an unlikely location and with no obvious suspects. (Hey, it's a small town.)

But when a second body is found -- and when both the FBI and Ireland's equivalent of the feds are called in to stop a drug shipment -- Boyle's curiosity is aroused. Though he instantly rubs the lead FBI agent, Wendell Everett (Don Cheadle), the wrong way, Boyle inserts himself into the investigation -- and seems consistently to be one step ahead of the supposedly better-informed feds and the drug smugglers themselves.

Like the best of these films, this one is less about the who than the how: how will the prickly but ultimately lovably admirable Boyle foil the drug dealers (who have him in their sights); how will he and Everett achieve the kind of rapprochement you'd like to see; how will Boyle get out of all of this with his life and, perhaps, his freedom.

Gleeson and Cheadle have an enjoyably prickly chemistry -- at once contentious and yet, grudgingly admiring. Cheadle has exceptional timing and a killer deadpan, which makes him a great foil for Gleeson's off-handed bits of verbal outrage.

Gleeson is a force of nature kept in check. You get the feeling he could blow through this story, upending everything in sight, the ultimate bull in the china shop. Yet he gives a performance of delicate timing, given the blunt insults and poisoned barbs he casually tosses off.

The film's secret weapon is the gang of crooks, played with hilarious erudition by Liam Cunningham, David Wilmot and Mark Strong. You don't expect to hear bad guys discussing the difference between Bertrand Russell and Nietzsche, even as they're preparing to dispatch someone in a violent way. They not only do it, but make it laugh-out-loud funny.

The Guard is grandly entertaining but also a movie with a soul, thanks to both Cheadle and Gleeson. It's one of the summer's hidden treasures that should be sought out for its consistently knife-like wit.