Kicking off the Edinburgh International Film Festival 2011 is The Guard. It’s one of those films that wouldn’t be anywhere near as effective if it wasn’t for its leading star. The star in question in this particular case is Brendan Gleeson, that reliable Irish character actor who pops up here, there and everywhere in everything from indie British fair to huge blockbusters (Troy, Harry Potter, Green Zone).

In this off-beat, witty, foul-mouthed crime comedy Gleeson plays the titular character, a policeman in Ireland who, despite his incessant bad behaviour, leads the way in helping to catch a group of drug smugglers. Before long he gets teamed up with an unlikely partner of sorts in an FBI agent who has come over the pond to help out with the investigation (Don Cheadle).

The humour here is pitch dark, with Gleeson’s Sergeant Gerry Boyle spouting racist remarks and insults as if they were going out of fashion. Example? “I thought only black people were drug dealers.” Yup, the film is littered with this sort of thing. Luckily writer/director John Michael DcDonagh (brother of Martin McDonagh, writer/director In Bruges – the obvious comparison to this film) knows how play the humor and gets huge laughs along with the winces of embarrassment as opposed to causing outright offence (although there are bound to be some people out there who take it the wrong way). It works because we’re not necessarily laughing at the one-liners themselves but rather that Gleeson’s character would be so audacious to even say them. “I’m Irish, racism is part of our culture,” he so plainly states when questioned on his racial slurs by Cheadle’s perturbed fish-out-of-water FBI agent.

The story which the astute black humor populates isn’t the most original you’re going to find, with the basic mis-matched partner scenario bringing nothing new to the crime-comedy genre and the drug smuggling plot not exactly breaking much new ground. However, this is a comedy which stands on the shoulders of Gleeson – and his interaction with Cheadle (two more opposite actors you’re not likely to find) – and the veteran actor carries it with apparent ease.