Dakota Johnson,Jason Segeland Oscar winnerCasey Affleckare set to star in the indie dramaThe Friend, which hails fromBlackfishdirectorGabriela Cowperthwaite, it was announced Wednesday.

The Friendtells the extraordinary true story of Nicole and Matthew Teague, who – after learning that Nicole has just six months to live – receive the unexpected support of their best friend, who decides to move into their family home and put his own life on hold. His impact on everyone is much greater – and more profound – than anyone could have imagined.

jason-segel-the-friend-movie

Johnson and Affleck will play the Teagues, while Segel will play the couple’s best friend.Brad Ingelsbywrote the script, which is based onMatthew Teague’s National Magazine Award-winning article that first appeared in Esquire Magazine.Ridley Scott’s Scott Free banner will produce with Black Bear Pictures, while Scott himself will serve as an executive producer. Production will start next month in Fairhope, Alabama, where the real Teague family resided.

Kevin Walsh,Michael PrussandRyan Stowellwill produce for Scott Free alongside Black Bear bossTeddy Schwarzman(Ben Is Back), whose staffersBen StillmanandMichael Heimlerwill serve as executive producers alongside Ingelsby, Teague, Scott and Ted Deiker. Scott Free’sRebecca Feuerwill serve as an associate producer. Black Bear is set to fully finance the film, which STXinternational will present to buyers at the upcoming European Film Market in Berlin. Endeavor Content arranged the financing and will handle U.S. sales.

casey-affleck-the-friend-movie

“I’m thrilled and honored to see the story come to life this way, thanks to the filmmaking vision of Gabriela Cowperthwaite and a script that Brad Ingelsby and I worked on closely together. It captures what’s at the heart of the story: deep love and loss, and the saving grace of friendship,” said Matthew Teague. “To have the talents of Dakota Johnson, Jason Segel and Casey Affleck help the story live on is remarkable. And I’m grateful to Scott Free and Black Bear, who have been both passionate and sensitive from day one. I hope the story gives people an honest glimpse of what it means to face mortality, and the value of having a true friend at your side, when that moment comes.”

Cowperthwaite previously directed the 2017Kate Mara-Edie Falcowar dramaMegan Leavey, as well as the acclaimed 2013 documentaryBlackfish, which went on to earn a BAFTA nomination for Best Documentary. Ingelsby is no slouch himself, having previously written theScott CooperdramaOut of the Furnace(which co-starred Casey Affleck) and the 2015 crime dramaRun All NightstarringLiam Neeson.

Best known forForgetting Sarah MarshallandFreaks and Geeks, Segel is an actor who doesn’t work nearly enough, in my opinion. He was genuinely excellent asDavid Foster Wallacein the indie movieThe End of the Tour, and I’m eager to see his upcoming TV seriesDispatches From Elsewhere. This is a great role for him and it’ll be nice to see him flex his dramatic chops even further. He’s coming off a pair of Netflix movies,Come SundayandThe Discovery.

Johnson is coming off the poorly-reviewed trio ofFifty Shades Freed,Bad Times at the El RoyaleandSuspiria(well, the latter two films have their fans, but only the first one made money), but she co-stars in two promising indies this year –Babak Anvari’sWoundswith Armie Hammer, andThe Peanut Butter FalconwithShia LaBeouf.

Affleck won an Oscar for his heartbreaking performance inManchester by the Sea, and he recently starred oppositeRobert Redfordin the underrated dramaThe Old Man & the Gun. He next stars in the survival movieLight of My Life, which he also wrote and directed.

The Friend is a WME package, as the agency represents Johnson, Segel, Affleck and Cowperthwaite, who is also repped by Black Box Management. Ingelsby is repped by CAA, while Johnson is also repped by Lighthouse Management. Deadline broke the news.