More than 50 years after it hit theaters and ushered in a new and more sexually daring style of on-screen entertainment, “Midnight Cowboy” continues to rank among the greatest American films ever made. It’s still the first and only best picture winner at the Oscars to be rated X, an indication of just how barrier-breaking the movie was when it debuted.

Now, a new documentary from Nancy Buirski will explore the behind-the-scenes odyssey to get the story of two small-time grifters produced, as well as the tumultuous era in which the movie was released and embraced. Glenn Frankel’s acclaimed book, “Shooting Midnight Cowboy: Art, Sex, Loneliness, Liberation and the Making of a Dark Classic,” will be the basis of the untitled film. “Midnight Cowboy” was directed by John Schlesinger and starred Dustin Hoffman and Jon Voight. It focused on Ratso Rizzo, a tubercular con man, and Joe Buck, a wannabe street hustler, following them as they eke out an existence in a crumbling New York City. Buirski’s film won’t be a straight making-of documentary — it will be equally interested in exploring the cultural and social upheaval of the late 1960s.

“This is a film about a masterpiece and the moment and the much wider sociological, political and human canvas on which it takes place. As dark as it is at times, it is laced with humor and hope,“ said Buirski, adding “Re-watching the film, I was reminded how beautifully it holds up after 50-plus years. I’d forgotten how tender it is.”

Buirski, who previously directed “The Rape of Recy Taylor” and “The Loving Story,” acquired the film rights to Frankel’s book through her documentary production company Augusta Films. The critically acclaimed book has been warmly embraced by critics since it debuted in March 2021. In a four-star review, USA Today raved that “Frankel puts it all together with narrative verve, telling a propulsive tale about creativity, commerce and loss,” while The Guardian called the book “the decade’s first essential cultural history.”

Here’s the official logline: “1969. John Schlesinger, Waldo Salt and Jerome Hellman created a classic and changed the course of movie making. The studio system was sinking under its own weight; independent filmmaking was waiting in the wings for a chance to break through, although not necessarily with a movie that dealt with prostitution, sordid crime and had a homosexual subtext. But emerging out of the protests of the ‘60s and the tragic murders of Robert F. Kennedy and Martin Luther King Jr., society was ready to face reality. Bloated musicals and melodramas were giving way to a more honest, if not cynical, look at the world. It was the right moment for novelist James Leo Herlihy’s utterly grim, but redemptive story.”

The untitled project will be written, directed and produced by Buirski for Augusta Films, with Simon Kilmurry, Susan Margolin and Claire L. Chandler.

Frankel won a Pulitzer Prize for his international reporting for his work for The Washington Post. He is the author of several books, including “The Searchers: The Making of an American Legend” and “High Noon: The Hollywood Blacklist and the Making of an American Classic.”

Buirski’s credits also include “By Sidney Lumet” and the upcoming “A Crime on the Bayou.” Prior to making her own films, Buirski founded and ran the Full Frame Documentary Film Festival from 1997 to 2008.

“Over the past decade, Nancy Buirski has created a body of work of thoughtful, artful and socially conscious documentary films that range from the arts and popular culture to stories of ordinary people caught up in the struggle for racial justice,” Frankel said. “It’s an honor to collaborate with someone of her caliber and conscience to create a documentary about the world of ‘Midnight Cowboy,’ one of the most transformative and ground-breaking movies of the modern era.”