If it weren’t for Brendan Gleeson, “The Guard” wouldn’t amount to much at all. With him, it’s still a pretty thin buddy-cop movie. But his florid performance, along with some tangy dialogue from John Michael McDonagh (brother of playwright Martin, who wrote and directed “In Bruges”), make the picture a brisk, engaging, if ultimately inconsequential oddball police procedural.

Gleeson plays Gerry Boyle, a burly, iconoclastic Garda sergeant in the Irish coastal region of Galway. As the picture opens, he and his new partner McBride (Rory Keenan) investigate the murder of an unknown man in a roadside lavatory, but the identity of the victim isn’t revealed until Boyle is summoned to a meeting with visiting FBI agent Wendell Everett (Don Cheadle), who’s come to Ireland in pursuit of a quartet of drug smugglers. It turns out that Boyle’s corpse is one of them, and before long the two men are working together in Galway to find and apprehend the other three.

From this point “The Guard” becomes a fairly typical tale of contrasting personalities, with Boyle the gregarious bulldozer who enjoys saying the most outrageous things and Everett the uptight, by-the-book outsider who (like the visitor in Bill Forsyth’s “Local Hero”) finds the residents a tight-lipped, insular bunch. But the two are alike in their absolute integrity, and they become unlikely allies in a battle against not only the criminals but official corruption as well.

There’s really nothing exceptional in how things go down, but Gleeson and Cheadle play off against one another well, with the American (who served as executive producer as well) generously giving his co-star plenty of room to build a blarney-spouting, oversized bear of a character. There’s also a nice rapport among the trio of villains—“boss” Liam Cunningham, muscled thug Mark Strong and wiry goofball David Wilmot. They obviously savor the edgy jokiness of the conversation McDonagh has constructed among them, but also manage to bring a genuine undercurrent of menace to their scenes, most notably one involving Keenan.

That points to another important facet of “The Guard”—its blend of very different tones, ranging from bawdy humor to pretty nasty, over-the-top violence. It’s the same tricky combination that McDonagh’s brother employs in his plays, and if John Michael isn’t quite as adept at it as Martin (it comes across as surface flash, while in his brother’s pieces it always points toward something more profound underneath), he still makes it work more often than not.

As director McDonagh does what’s basically a workmanlike job, but he doesn’t get in the way of his actors, and the result is a string of colorful performances not only from the stars but the supporting cast, which also includes Fionnula Flanagan as Boyle’s dying mum (cue a sentimental side-plot that shows the cop’s sensitivity) and Katarina Cas as McBride’s eastern European wife, as well as an array of colorful character performers in lesser roles. Larry Smith’s energetic camerawork, Chris Gill’s sharp editing and Calexico’s inventive score are all distinct plusses.

“The Guard” ends with a bang—a skillfully choreographed action sequence set on a pier. But its greatest pleasures are in the small details along the way to it. And, of course, in Gleeson’s wonderfully hammy, larger-than-life performance, which overwhelms even the Irish scenery.