The story behind the Supreme Court's landmark ruling that legalized same-sex marriage across the United States will eventually make its way onto the big screen as 20th Century Fox has secured the rights to make a movie about the case, the New York Times reported.

The studio has purchased the life rights of Jim Obergefell, the lead plaintiff in a lawsuit, and his lawyer, Al Gerhardstein, it revealed on Tuesday. Fox also secured screen rights to a still-unwritten book by Obergefell and journalist Debbie Cenziper, which will likely be titled "21 Years to Midnight," the newspaper detailed.

Hollywood civil rights dramatizations such as last year's "Selma" have traditionally fared well at the box office, Newsweek noted, and "it's not hard to imagine the movie being a critical and commercial winner." And gay-themed flicks -- including "Philadelphia" (1993), "Brokeback Mountain" (2005) and "Milk" (2008) -- also proved to be successful endeavors for their respective studios.

A finished film, however, is at least two years away, the New York Times cautioned. The studio said that the project will be handled by Fox 2000 -- a division known for literary adaptations such as "Life of Pi" and "The Devil Wears Prada" -- and will be produced by Wyck Godfrey and Marty Bowen. It still needs to hire a screenwriter to work with Obergefell and Cenziper, the newspaper noted.

Obergefell, an Ohio real estate agent, married his longtime partner, John Arthur, in 2013 aboard a plane that had landed in Maryland, where same-sex marriage was already legal, the Cincinnati Enquirer recalled. Arthur was suffering from amyotrophic lateral sclerosis, or ALS, a progressive neurological disease that robs patients of their ability to walk, talk and, eventually, breathe.

When his husband died, his home state refused to list Obergefell as his spouse on the death certificate, which is why he sued, the New York Times said. Obergefell's is "a transcendent love story about someone who goes to such a length for love that he ends up changing the world," Godfrey told the newspaper.