Update: Despite seemingly being finalized last week, the $500 million deal to acquire The Weinstein Company has fallen through (via Variety). It seems that the investors “uncovered new information about previous undisclosed liabilities.” Our original article follows below.

After teetering on the edge of bankruptcy, The Weinstein Company sold its assets to an investor group led by former Obama-era Small Business Administrator Maria Conteras-Sweet.

The $500 million deal will spare the embattled company from bankruptcy and go to creating a compensation fund for the victims of the disgraced former executive Harvey Weinstein.

The Weinstein Company’s board of directors and Contreras-Sweet confirmed the deal on Thursday, Variety reports, after hurried negotiations took place between the two parties and New York Attorney General Eric Schneiderman.

In a statement released Thursday, the Weinstein Co. board said:

“The deal provides a clear path for compensation for victims and protects the jobs of our employees. We greatly appreciate the efforts of Attorney General Schneiderman and his staff, Maria Contreras-Sweet, Ron Burkle and his team at Yucaipa for bringing about this agreement. We consider this to be a positive outcome under what have been incredibly difficult circumstances.”

The announcement came shortly after Contreras-Sweet confirmed that the deal was back on, and that her new company would be “led by a board of directors made up of a majority of independent women.”

Under the deal, the buyers will assume $225 million in existing debt. The buyers will also pay out $275 million in equity, of which approximately $100 million will become operating capital for the new company. Bob Weinstein will depart the company along with the Dimension brand, but the Dimension titles will remain under the investor group along with the Weinstein’s Co.’s 277-film library.

The Weinstein Co. will undergo a drastic rehaul to counter the taint of Harvey Weinstein’s watershed sexual assault allegations. In addition to a female-majority board of directors, the company will get a new name, which investors say may be “Wonder Hill.” The compensation fund for the victims of Harvey Weinstein has also been increased to $90 million.

Contreras-Sweet first made a bid for the Weinstein Co. in November, with an investor group backed by billionaire investor Ron Burkle. After nearing a deal in January, the sale talks almost completely collapsed twice over the course of the last two weeks. The first bump in the road came when the New York Attorney General’s office filed a civil rights lawsuit against the Weinstein Co. on February 11, criticizing the terms of the sale and questioning the existence of the victim’s fund. Talks would restart, but halt again when the Weinstein Co. announced it would file for bankruptcy on February 25 due to Burkle’s reluctance to provide $7 million in upfront capital.

Schneiderman’s lawsuit remains active, but the Attorney General said his office would “work with the parties in the weeks ahead to ensure that the parties honor and memorialize these commitments prior to closing.”