It may be nothing more than a modern film noir incongruously set in a medieval city, but “In Bruges” is made enjoyable by its unusual locale, tart tough-guy dialogue and a strong cast.

The film is the feature debut of Martin McDonagh, the playwright known for his serio-comic run of Irish plays and the Kafkaesque “The Pillowman.” The premise has a pair of hit-men who’ve just completed a job in Ireland sent by their boss to lie low for a time in Bruges, a well-preserved medieval town in Belgium, until the heat dies down. (Not only was the target a Catholic priest, but a young boy was accidentally killed in the shooting.) Ken (Brendan Gleeson), a veteran of the trade, is interested in touring the place, but volatile neophyte Ray (Colin Farrell) is antsy from their first arrival—and, it’s made clear, tormented by the fact that it was he who actually fired the shots.

The first part of the picture feeds off the Odd Couple nature of the duo, with the rumpled but fastidious and cautious Ken contrasted with the crude, reckless Ray. But the situation changes when their violent, abrasive boss Harry (Ralph Fiennes) tells Ken that he’s to kill Ray and Ken, who’s developed an almost paternal concern for the lad, finds himself unable to follow through. That brings Harry himself to Bruges to clean up the mess.

That’s just the basic plot; “In Bruges” is festooned with digressions that shoot out from it in deliberately oddball directions. The most notable is Ray’s encounter with a bad-tempered, lascivious dwarf (Jordan Prentice) who’s shooting a movie in the city, but there’s another involving Ray’s dalliance with a local girl (Clemence Poesy) who turns out to be something quite other than she initially seems (and who has a surly boyfriend, played by Jeremie Renier), as well as one featuring Zeljko Ivanek as a tourist with whom Ray gets into a brawl. It’s undeniable that as all the machinations click into place, the plausibility level declines, and one may throw up his hands in the course of the big, bloody chase finale, which closes with what’s basically a black McDonagh joke. But the piece is meant to be a combination of pulp convention and dark comedy, and has to be appreciated on that level or not at all.

And all of it’s played out against the courtyards, canals, church towers, parks and winding streets of Bruges—locations that give the images the shadowy, slightly sinister air characteristic of noir melodramas from the forties and fifties. (And in case you don’t get the similarity, McDonagh at one point tosses in a scene from Orson Welles’s “Touch of Evil” on a television screen to make the connection obvious.)

The Belgian city is, in fact, one of the stars of the picture, but background, however photogenic, isn’t everything, and “In Bruges” is blessed by McDonagh’s way with words, which provides juicy verbal set-pieces for all his actors, even if they sometimes come out of left field (like Prentice’s drug-addled rant at one point). Gleeson mixes toughness and a surprising degree of sympathy as Ken, while the more intense Farrell—just about doubling up on his role in Woody Allen’s “Cassandra’s Dream” as a man consumed by guilt—once again shows his talent for playing a man on the emotional edge. As for Fiennes, he creates a portrait of gruff malevolence that’s frighteningly funny, and Prentice is drolly amusing as a little person with a nasty streak. The others—Poesy, Renier, Ivanek, Thekla Reute as the pregnant owner of the hotel where Ken and Ray stay and Eric Godon as a gun dealer free with suggestions—all have their moments, too.

There’s nothing terribly deep about “Bruges,” but as a genre exercise it proves a nice place to visit, especially with a wordsmith as canny as McDonagh acting as tour guide.