UPDATED: Fox Searchlight is closing a $17.5 million deal to acquire worldwide rights to “The Birth of a Nation,” a drama about the 1831 slave rebellion led by Nat Turner, that had an electrifying premiere at this year’s Sundance Film Festival.

The Weinstein Company, Netflix, Paramount, and Sony were among the companies making offers on the picture, Variety has learned. Bidding lasted through the night, with one company, believed to be Netflix, offering $20 million for the picture. The deal is the richest in Sundance history.

The film was written and directed by Nate Parker, who also stars as Turner and invested his own money in the production. Parker is best known for his work in “The Great Debaters” and “Beyond the Lights.” The response to the picture was seismic and the Oscar buzz erupted as soon as the lights went up following the picture’s debut at the Eccles Theatre.

In a rave review, Variety critic Justin Chang wrote, “‘The Birth of a Nation’ exists to provoke a serious debate about the necessity and limitations of empathy, the morality of retaliatory violence, and the ongoing black struggle for justice and equality in this country. It earns that debate and then some.”

The cast includes Armie Hammer, Penelope Ann Miller, Jackie Earle Haley and Mark Boone Junior. WME handled sales of the film.