Playwright Martin McDonagh’s third film is his best, a cunning and surprisingly moving tale of an implacable maternal demand for justice and the blowback it engenders. Marked by McDonagh’s characteristic mixture of telling drama and bitter humor, “Three Billboards Outside Ebbing, Missouri” may be burdened with an unwieldy title, but it advertises one of the year’s most compelling films.

Frances McDormand, in a performance that serves to cap a brilliant trilogy—the two earlier ones being “Fargo” and the HBO mini-series “Olive Kitteridge”—is Mildred Hayes, who runs the town’s gift shop. She is a severe, plain-spoken person by nature, and she harbors a need for retribution: her daughter Angela (Kathryn Newton) was raped and murdered walking home one night along the lonely road that leads to the Hayes house, and her body burned. The culprit has not been caught, and a flashback to the night of the crime reveals why even if he were, Mildred would find it difficult to forgive herself. Still, identifying the person responsible is all she can think about.

That’s why she decides to rent three old, decrepit billboards that line the road where Angela was killed from Red (Caleb Landry Jones), the geeky guy who runs the Ebbing ad firm, and to plaster them with a simple message: “Raped White Dying…And Still No Arrest…How Come, Chief Willoughby?” The accusation singles out Sheriff Bill Willoughby (Woody Harrelson), whom she blames for the failure of the law to find Angela’s killer.

One might think that Willoughby would turn out to be a corrupt, or simply lazy, small-town cop who hasn’t worked the case professionally. But it turns out that he’s a dedicated, almost Andy Taylor type who’s taken all the right moves but wound up empty-handed. He’s a decent family man with a nice family—a wife (Abbie Cornish) and two little daughters he treats with great affection. He’s also dying of pancreatic cancer—something that he thinks might cause Mildred to reconsider the billboards, and is one reason why townspeople generally side with him against the gruff, grieving mother, who even berates the priest (Nick Searcy) who visits to suggest that she might do well to take the messages down.

It’s here that the script pulls the rug out from under our feet; her response to Willoughby’s condition is to observe coldly that the billboards wouldn’t be half so effective after he’d “croaked.” What might have easily become one of those standard-issue stories about a mother driven to seek—and find—justice for her dead child against an entrenched, callous bureaucracy suddenly becomes something much more complicated and disquieting, while remaining blisteringly funny.

That human complexity extends to the film’s other characters as well. There’s Mildred’s ex-husband Charlie (John Hawkes), an ex-cop who left her for a younger, none-too-bright but amiable girl named Penelope (Samara Weaving) and finds her obsession dangerous. And their son Robbie (Lucas Hedges), who lives with his mother and is frustrated with the tack she’s taken. And James (Peter Dinklage), who harbors a crush on Mildred so strong that when she does something unwise, he gives her an alibi in hopes that doing so will endear him to her.

Most remarkable of all the other characters, though, is Jason Dixon (Sam Rockwell), a racist, dimwitted officer with a brutally contemptuous old hag of a mother (Sandy Martin). For some reason Willoughby has treated Dixon with a degree of consideration the guy really doesn’t deserve, and Dixon responds with loyalty to his chief so complete that when Mildred attacks Willoughby, he’ll promptly arrest the gift shop clerk (Amanda Warren), who happens to be black, on a bogus charge, and then unleash his anger on Red.

Yet Dixon also changes, becoming in a weird, unsettling fashion a symbol of hope when he suffers punishing losses but becomes a better man, believing that he might have solved the riddle of Angela’s murder in the way that Willoughby predicted it could be solved (by accident), and actually making common cause with Mildred in the process. McDonagh doesn’t deal with this in any sort of maudlin fashion—he, McDormand and Rockwell are far too astute for such a miscalculation, adding a dollop of dark comedy to the mix. Yet the ending of “Three Billboards,” like so much of the film, literally goes off in a direction you’re unlikely to anticipate.

McDonagh’s script is full of clever twists and pointed dialogue, much of it presented theatrically in the form of well-structured, slightly unnatural conversations, and he secures amazing performances from McDormand and Rockwell in particular. But Harrelson, Hedges, Dinklage and Jones all offer splendid work as well, and while Hawkes, Weaving, Newton, Martin, Zeljko Ivanek (as the nervous sergeant in charge of the Ebbing office) and Clarke Peters (as an outsider law enforcement figure) have only limited screen time, they all register strongly. Production designer Inbal Weinberg and cinematographer Ben Davis succeed in making the North Carolina locations a convincing stand-in for the Midwest (Davis also manages one remarkable tracking sequence involving Rockwell and Jones), Jon Gregory’s editing makes the many dialogue scenes move along crisply, and Carter Burwell’s score adds a homey feel to the unorthodox proceedings.

“Three Billboards” is the sort of film that would benefit from multiple viewings, but you definitely shouldn’t miss seeing it at least once.