Following last month's ruling of the U.S. Supreme Court that allowed same-sex marriages in the country, 20th Century Fox secured the rights to make a movie on the case that led to the legalization. Fox reportedly bought the life rights of Jim Obergefell, the lead plaintiff in the lawsuit, and his lawyer Al Gerhardstein, for the upcoming movie, the New York Times reported on Tuesday.

Fox also reportedly secured screen rights to an unwritten book called “21 Years to Midnight,” co-authored by Obergefell and journalist Debbie Cenziper. The book has been submitted to the publishers and a deal is expected as soon as this week, the Times reported.

The project will be handled by Fox 2000, the division that produced the “Twilight” series and “The Fault In Our Stars,” which made over $307 million worldwide last year. It is also known for producing movies based on books like “Life of Pi” and “The Devil Wears Prada.”

The film, which will be produced by Wyck Godfrey and Marty Bowen, is expected to be completed in two years. Fox 2000 is reportedly looking for a screenwriter to collaborate with the two producers.

“It’s a transcendent love story about someone who goes to such a length for love that he ends up changing the world,” Godfrey said, according to the Times.

Obergefell from Ohio married his terminally ill husband John Arthur in Maryland in 2013. Arthur died three months later and an Ohio judge allowed Obergefell to be listed as the spouse on the death certificate. However, the state appealed in November, and had it won the lawsuit, a new death certificate would have been issued for Arthur, stating him as “single.” Obergefell sued the state, and his name went on the case because he was the first to file. It also includes Tanco v. Haslam, DeBoer v. Snyder and Bourke v. Beshear.

“This is just an amazing story, and I feel privileged to have him trust me to help tell it in a narrative nonfiction book,” Cenziper, a recipient of Pulitzer Prize in 2006, said, according to the Times, adding that she had known Obergefell for two decades. Arthur was reportedly a cousin of Cenziper's first husband.

"The Constitution promises liberty to all within its reach, a liberty that includes certain specific rights that allow persons, within a lawful realm, to define and express their identity," Justice Anthony Kennedy said in an opinion after ruling on the case, adding: "The petitioners in these cases seek to find that liberty by marrying someone of the same sex and having their marriages deemed lawful on the same terms and conditions as marriages between persons of the opposite sex."