By Martin Clark, Alfred A. Knopf, New York, N.Y. 356 pages, $24.95

In 2008, a former Manhattan assistant district attorney, Dan Bibb, admitted that in 2005 he had deliberately tried to lose a hearing held to determine whether to reverse the murder convictions of two men convicted of killing a nightclub bouncer in 1990. Mr. Bibb says he aided the defense only after he failed to convince his boss, Robert Morgenthau, of his belief that the men were innocent, an account Mr. Morgenthau has disputed. Earlier this year the Disciplinary Committee declined to take action against Mr. Bibb.

Do actions such as Mr. Bibb’s represent a courageous attempt to achieve justice, or an inexcusable abdication of a prosecutor’s obligation to follow the law?

That question is at the heart of Martin Clark’s provocative and highly entertaining legal thriller, “The Legal Limit.”

Clark is a circuit court judge in rural Patrick County, Virginia, where the novel takes place, and he puts his knowledge of small town southern life and the complexities of the law to good use in crafting a compelling narrative that poses many intriguing questions on the way to its creative conclusion.

The story centers around Mason Hunt and his brother Gates. Mason is the good son who makes his long suffering mother Sadie proud by earning his law degree and snaring a prestigious job in a fancy Richmond law firm. But before Mason can escape to his new life, he becomes entangled in the cover-up of a rash murder committed at the end of a long beer and drug fueled night by his irresponsible parasite of a brother, Gates. Largely due to Mason’s astute efforts to conceal the evidence of the crime, Gates avoids discovery and arrest. But, predictably, his reprieve does not last, as he later receives a 44-year sentence after being caught in a police sting operation attempting to sell an ounce of cocaine for $1,000. That the police actions could be considered entrapment (to that point Gates had specialized in selling only $50 “dabs”), and the sentence an overreaction to a non-violent crime (“why’d you have to take his whole life”? his mother beseeches one juror after the sentence is announced), are only a few of the many moral ambiguities presented in the book.

Mason eventually returns to the town where he grew up to take over as commonwealth’s attorney, only to later see his long ago complicity in his brother’s crime threaten the new life he has built. Mason subsequently engineers a complex, Rube Goldberg-like series of legal manipulations to achieve what he considers a just outcome for himself and his family.

Clark is clear about the troubling moral issues involved in this sort of rough justice. At one point, a judge whom Mason is endeavoring to sway to his side by pointing to the suffering his downfall would cause his saintly mother and troubled daughter, retorts: “Isn’t this simply a variant of the defense you and I listen to every day, the type of reasoning I’ve heard you condemn over and over? You’ve become the guilty criminal propping up his bawling child or feeble mom as a pity shield.”

Nonetheless, the reader senses that in the end Clark’s sympathies lie with Mason, and a belief that justice is best served when judges see the law as a flexible tool, rather than as a set of inviolable rules. As Mason says to one judge, “you didn’t get the job just to pound the rubber stamp.” Clark himself has said that he hopes that readers of his novel “will understand that everything is always not black and white, right or wrong.”

The good news is that while “The Legal Limit” poses thought-provoking questions about the tension between justice and the law, the medicine goes down smoothly. Clark is an excellent storyteller, and his characters, from the ne’er do well, but always entertaining Gates, to the flamboyant, dreadlock-wearing black assistant commonwealth’s attorney, Custis Norman, and a host of other well-drawn supporting players, bring the story to life.

Indeed, the book is as much about the pleasures and obligations of family and friendship as it is about the law. Clark’s characters are repeatedly asked to determine for themselves when it is appropriate to bend the rules, or reconsider personal prejudices, in the interests of their friends and family. And while sometimes actions taken with the best of intentions backfire in unexpected, and even tragic ways – Mason’s well-intentioned reduction of a young driver’s DUI charge has ramifications he could never have imagined – one message of the book is that it is just these sorts of compromises, large and small, that create a community.

Should you read “The Legal Limit?” Yes. Because it asks important questions about the application of the law to real human beings that every lawyer would do well to bear in mind. But mostly because at the end of the day – even a busy New York lawyer’s long day – it is a good story well told.

Kenneth Crowley is a deputy general counsel and co-head of litigation at UBS Financial Services Inc.