David Heyman’s Heyday Films, whose credits include “Gravity,” “Once Upon a Time in Hollywood,” “Marriage Story” and the Harry Potter and Fantastic Beasts franchises, and BBC Films have secured the film rights to Stephen Sondheim and James Goldman’s musical “Follies.”

“Follies” will be adapted for the screen and directed by Dominic Cooke, a four-time Olivier Award winner, who directed the critically acclaimed 2017 revival of “Follies” at London’s National Theatre, which won best musical revival at the Oliviers, and returned this year due to popular demand. Cooke also directed the film “On Chesil Beach,” starring Saoirse Ronan, and the BAFTA nominated TV series “The Hollow Crown.”

Based on the book by Goldman, and with music and lyrics by Sondheim, “Follies” features classic songs including “Broadway Baby,” “I’m Still Here” and “Losing My Mind.” It first appeared on Broadway in 1971, going on to be nominated for 11 Tony Awards and winning seven.

The action takes place in New York in 1971 when the performers who made Dimitri Weismann’s “Follies” such a hit gather for a farewell party. The next day the iconic Weismann theater will be demolished, but for one last time, the Follies’ girls and their beaus come together to remember and rekindle their past.

“Every note, every word of every song from ‘Losing My Mind’ through ‘Broadway Baby’ to ‘I’m Still Here’ charts exactly where the character is emotionally and psychologically,” Cooke said. “Such material is a gift for any director. James Goldman’s skilful book nods as much to the golden age of movie musicals as to Broadway, so it feels like natural material to turn into a movie.”

Sondheim said: “Over the years, there have been many attempts to bring ‘Follies’ to the screen, but not until Dominic Cooke’s brilliant production at the National Theatre of Great Britain did it seem like it could be a real movie.”

“Follies” will be produced by Heyman and Rosie Alison (“Paddington,” “Testament of Youth”). Rose Garnett, director of BBC Films, will executive produce.