Partly a story of a wayward father’s unswerving love for his wayward daughter and intermittently a romantic thriller, “Stillwater” is, most memorably, a hard-edged portrait of a roughneck from the Oklahoma oil patch—closed off, rigid, taciturn—who gradually opens up to himself and the world around him. The film, playing in theaters and directed by Tom McCarthy (“Spotlight”) from a script he wrote with Thomas Bidegain, Marcus Hinchey and Noé Debré, has its own rigidities, but Matt Damon, in the central role, confers a somber grace on a man who always thought he had none.

Bill Baker is a roughneck in many respects. A high-school dropout, he has stumbled through life from one odd job to another, doing drugs and boozing steadily along the way. He has also been a disastrous parent, a failing that leaves him and his estranged 20-something daughter, Allison ( Abigail Breslin ), in a terrible fix. She’s in prison in Marseille for having killed her French roommate and partner, a crime she claims she didn’t commit. A recently surfaced nugget of information might prove her innocence, but her mother is dead, leaving Bill as her best, worst and only hope of finding the guilty party and reopening her case. Worse still, his knowledge of French culture is nil, while his gifts as a linguist are limited to emitting short, gruff sentences in English. (The fictional case was loosely based on that of Amanda Knox, an American exchange student who was acquitted in 2015 of the charge of murdering her flatmate.)

The spectacle of Bill leaving his home and a construction job in Stillwater for the south of France is affecting, and all the more so when he arrives at a modest hotel in Marseille, carrying all his possessions in a rucksack and looking unmistakably American, from his shades perched above the visor of his baseball cap to his sturdy work boots. It turns out that this fish has been out of water here before, since Allison has already served one year of her five-year sentence. We’re given to understand that any previous visits were tense at best, but she’s his daughter and he won’t give up on her, even if she’s scornful of his ability to capitalize on what she considers new evidence and everyone else sees as shadowy hearsay.

Matt Damon

Matt Damon

Photo: Jessica Forde/Focus Features

In one sense “Stillwater” is a political drama. The film means to make us examine our assumptions about white working men from red states who look like Bill and share his stern visage. He is, in fact, a God-fearing citizen who owns a shotgun and a Glock and who may or may not lean hard right. (That’s dealt with adroitly when someone asks if he voted for Trump and he says no, then adds that he didn’t vote at all.) His affect is flat, whether from grievance, shyness or who knows what—so flat that the filmmakers come perilously close to reinforcing the cliché they mean to dispel.

Yet he’s beset by confusions and contradictions—a habit of self-disdain that echoes Allison’s scorn and borders on self-hate; a moral code that’s nowhere as strict as it seems to be; an aversion to nuance but a capacity for ambiguity; a bleak view of life, which he calls “brutal”; and, before and after everything else, a smoldering desire to be redeemed if not admired and loved.

Abigail Breslin and Matt Damon

Abigail Breslin and Matt Damon

Photo: Jessica Forde/Focus Features

Mr. Damon is fine in the role; it’s one more growth spurt in a career that continues to be full of them. Ms. Breslin is touching too, though her character is underwritten apart from one scene when the camera moves in for a close-up that almost seems labeled Explanatory Moment. Many details of the crime-procedural element—the hero’s dogged, dangerous search in the Marseille underworld for exculpatory evidence—are less than convincing or depend on happenstance. And it’s hard to see what value was added by the screenplay’s specifying that Allison and her murdered roommate were in a lesbian relationship.

At its core, though, the film comes most vividly to life after Bill crosses paths with a French single mother, Virginie (a beautifully unaffected performance by Camille Cottin ), and her 9-year-old daughter, Maya (a bewitching performance by Lilou Siauvaud). It’s an arrangement of convenience at first. Virginie becomes his interpreter and guide through the teeming city and its judicial system. He looks after Maya while her mother pursues an acting career.

Camille Cottin and Matt Damon

Camille Cottin and Matt Damon

Photo: Jessica Forde/Focus Features

Never mind the language barrier; the movie is only a bit longer than two hours, so the three reach a meeting of words as well as minds in record time. What’s persuasive, beguiling and not at all formulaic is how the roughneck flourishes and changes under the influence of a good woman who has foibles of her own, and a smart, funny kid who could fill the role of surrogate daughter in another movie, though less than neatly in this one. In “Stillwater,” as the title suggests, feelings run deep, just not always in the expected direction.