Writer-director John Michael McDonagh and actor Brendan Gleeson made a big international splash with 2011’s “The Guard,” a terrifically entertaining action-comedy that offered little indication of the depths of humor, compassion, despair and grace they would achieve in their masterful follow-up, “Calvary.” Grounded by a performance of monumental soul from Gleeson as a tough-minded Irish priest marked for death by one of his parishioners, the film offers a mordantly funny survey of small-town iniquity that morphs, almost imperceptibly, into a deeply felt lament for a fallen world. A completely sincere work about the persistence of faith and the Catholic Church’s soul-shattering legacy of abuse, this literate, beautifully crafted picture should translate near-certain critical plaudits into a distinguished arthouse reception worldwide.

Given the B.O. receipts and Oscar nominations racked up by Stephen Frears’ anti-clerical dramedy “Philomena,” it will be intriguing to see how McDonagh’s less ingratiating but vastly more accomplished picture plays with audiences in Ireland and beyond. The director has described his second feature as “basically Bresson’s ‘Diary of a Country Priest’ with a few gags thrown in,” a description that for all its absurdity nails the essence of this caustic yet contemplative film: Leisurely paced, unapologetically talky and overtly concerned with matters of spiritual import, “Calvary” may not achieve the record-breaking success of “The Guard” (still the most successful Irish indie of all time). But for sustained maturity and tonal mastery, it upstages not only McDonagh’s debut but also his brother Martin’s comic thrillers “In Bruges” and “Seven Psychopaths,” all while retaining the pungent fatalism and bleak humor that run so indelibly through both filmmakers’ work.

“I first tasted semen when I was 7 years old,” an unseen man tells an unnamed priest (Gleeson) in the dark shadows of the confessional. He goes on to explain that he was repeatedly raped by a priest over the course of five years, a crime for which he will exact retribution in the most irrational and unexpected way imaginable. “There’s no point in killing a bad priest,” he says. “I’m going to kill you because you’re innocent.” He sets their fateful next appointment for the next Sunday, exactly one week later, leaving our anxious hero of the cloth to determine which member of his flock is planning to murder him.

What follows is an existential detective story of sorts, or perhaps an Agatha Christie whodunit by way of Hitchcock’s “I Confess,” in which the priest goes about his coastal village, tending to his flock while a seven-day clock ticks quietly away in the background. What he finds is a community steeped in anger, disappointment and, despite their continued presence at mass, a near-total indifference to the notion that faith, repentance and good works have any real meaning.

There’s a butcher (Chris O’Dowd) who is initially suspected of beating his town-slut wife (Orla O’Rourke), until he explains that she probably sustained her injuries at the hands of her Ivorian-immigrant lover (Isaach De Bankole). There’s also a vaguely sinister police inspector (Gary Lydon, reprising his role from “The Guard”) whom the priest interrupts mid-tryst with a saucy male prostitute (Owen Sharpe); a doctor (Aidan Gillen) who makes no secret of his violently atheist views; an extravagantly wealthy man (Dylan Moran) whose riches have failed to bring him any lasting happiness; a sex-starved young man (Killian Scott) considering joining the army in order to vent his violent impulses; and an aging American writer (M. Emmet Walsh) determined to end life on his own terms.

All these villagers are introduced, one after another, in a series of sharply written, compellingly acted and increasingly pointed moral discussions, during which the priest will offer his counsel while scanning for clues as to who the would-be killer might be. But the richest insights here are those we glean into the character of the grizzled clergyman himself, a widower and a father, a dog lover, a recovering alcoholic, and an unusually pragmatic, erudite soul (“You’re too sharp for this parish,” one villager notes) whose every nugget of hard-headed wisdom resonates with bitter life knowledge.

It’s a role that one cannot imagine in the hands of anyone other than Gleeson, who has never seemed less capable of hitting a false or inauthentic note. Despite the actor’s deliberately constricted range here, moments of gruffness, exasperation, resignation and quietly choked-back emotion all manage to register, fleetingly yet indelibly, in the those magnificently weathered features. This virtuous protagonist couldn’t be more different on paper from the surly, sozzled cop he played in “The Guard,” yet Gleeson roots both characters in the same bone-deep integrity, and the same fearless determination to follow their sense of duty to the unforeseeable end.

It’s not clear at exactly what point the film has made its shift from foul-mouthed village comedy to quietly devastating passion play; certainly the transition feels complete by the time the priest pays a visit to an imprisoned rapist-murderer-cannibal (played, in a particularly perverse casting choice, by Gleeson’s son Domhnall). Amid all the accumulated waste and despair, two scenes stand out for their extraordinary tenderness: a beachside reckoning between the priest and his troubled daughter (a superb Kelly Reilly), and a thoughtful conversation with a woman (Marie-Josee Croze) who has lost her husband but not her faith. Hope, it seems, has not been completely extinguished. And yet, as it follows the priest on the lonely walk to his own personal Golgotha (the seven days of his journey conjuring any number of biblical allusions), “Calvary” makes clear, with utter conviction, that the Church’s incalculable abuses have exacted and will continue to exact a terrible human price.

Putting aside the stylistic bravura of “The Guard,” McDonagh and his collaborators have delivered a technically immaculate work that feels appropriately austere by comparison. D.p. Larry Smith’s widescreen compositions are framed with unfussy precision; as stunning as the rugged landscapes are to behold, particularly the shots of waves breaking against cliffs (the production shot on the east and west coasts), the lighting and color balancing of the interior shots are no less exquisite. Patrick Cassidy’s melancholy score is summoned at just the right moments.

For the record, the press notes mention that “The Guard” and “Calvary” are the first two installments of a trilogy that will conclude with a film titled “The Lame Shall Enter First.”