‘Our Friend” really does celebrate friendship. If that falls short of a bombshell, some explanation is in order. Gabriela Cowperthwaite’s beautiful and affecting drama is also about mortal illness, a terrible cancer that strikes a wife and mother in her prime, and devastates her husband and two young daughters as well. But artistry involves choices, and the abiding emphasis here is as unfashionable and open-hearted as the film’s title. It’s less on the ravages of the disease than on the changes that ensue when the couple’s best friend shows up to help out for two weeks, then stays to become part of the family. (Ticket and streaming info at ourfriendmovie.com.)

The stars are Dakota Johnson, Casey Affleck and Jason Segel; all three give flawless performances. Ms. Johnson is Nicole Teague, a buoyant woman who may not have lived up to the ardent prophecy of her boyfriend and, later, husband—“They’re going to say ‘There she is, the greatest living musical theater actress of all time!’” All the same, she enjoyed a modest career in regional theater until motherhood came along. Mr. Affleck is Nicole’s husband, Matt Teague, a journalist who, in real life, was the author of the 2015 Esquire Magazine article that the film was based on. The longtime friend is Dane Faucheux, who, in the adaptation by Brad Ingelsby and in Mr. Segel’s exquisite quicksilver portrayal, turns out to be not only indispensable but a pure soul, a lost soul, an unlikely soulmate of Mary Poppins and one of the most endearing characters to have graced the screen in recent memory.

Most of the action is set in and around Fairhope, Ala., a small town that’s home for Nicole, Matt and their kids, Molly (Isabella Kai) and Evie (Violet McGraw). But the narrative hops back and forth between present and past, always displaying time stamps that note how many years it is before or since Nicole’s diagnosis in 2012. The film is too long and its structure can be distracting, but it dramatizes the transformative nature of the event, and, in flashbacks to a happier time, the loving ties that bind Nicole and Matt to the man she’s known since college, and who subsequently became his best friend. (The cinematography, clear-eyed yet calmly lyrical, was done by Joe Anderson.)

Dane lives in New Orleans and works as a manager at a small sporting goods store. Wonderfully funny and poignantly charming, yet faintly haunted, he sustains his love life at a simmer and struggles with some sort of existential fear that isn’t specified and doesn’t need to be. We understand, just as Nicole and Matt do, that lack of ambition isn’t Dane’s problem; what he lacks is the belief that he can forge a good life for himself. Until, that is, he intervenes at a moment when his friends’ distress is spiraling out of control, and possibly saves himself in the process. (Mr. Segel is so touching, and Ms. Cowperthwaite’s direction so assured, that I happily embraced the movie’s most contrived sequence, one in which Dane goes on a solitary hike in a borderline-allegorical desert wilderness.)

The intimacy of Ms. Johnson’s performance is extraordinary. She is the least assertive of movie stars, yet the courage, despair and fury she finds in Nicole will lift you up and spin you around. Mr. Affleck’s dry precision, his gift for emitting while withholding like some master of Tibetan throat singing, confers a distinctive quality on Matt—a passionate remove that reveals his inability, at least at first, to confront his beloved’s decline. And the elegance of the film’s craftsmanship is all the more remarkable given that the director, Ms. Cowperthwaite, is best known for her 2013 “Blackfish,” a shocking and controversial documentary about captive killer whales at the SeaWorld chain of theme parks.

This post first appeared on wsj.com

You May Also Like

Eclipse

eclipse glasses, annular solar eclipse