PREVIOUS, 3:16 PM: In a plot twist worthy of a cinematic thriller, the investment team lead by Maria Contreras-Sweet has reached a deal to acquire The Weinstein Company’s assets just days after it appeared the embattled studio was destined for bankruptcy.

Contreras-Sweet announced that she and the Weinstein Co.’s board of directors reached an agreement today for the purchase of assets to launch a new, female-led movie studio whose board of directors will be made up by a majority of women.

The deal would save about 150 jobs, protect the small businesses owed money by TWC and create a fund to compensate victims of sexual harassment and abuse.

“This next step represents the best possible pathway to support victims and protect employees,” Contreras-Sweet said in a statement.

Contreras-Sweet acknowledged the role of New York Attorney General Eric Schneidermanwhose civil rights lawsuit, filed on February 10 threatened to derail the $500 million deal. The attorney general’s office might agree to settle the suit if the victim’s fund, proposed in a meeting last week, were created to compensate Harvey Weinstein’s alleged victims.

“We are grateful to the New York State Attorney General’s office for their efforts in helping us reach an agreement and we are grateful to our investors who have believed in this process and in the compelling value of a female-led company,” Contreras-Sweet said in a statement issued while she was still in the room.

It is unclear whether the investor group, which includes billionaire Ron Burkle, agreed to provide a $7 million bridge fund to keep The Weinstein Co. afloat through the 40-day process to close the deal. The matter was resolved “amicably,” according to one source.

The Weinstein Co. appeared to walk away from the deal in frustration late Sunday, saying it was running out of cash and feared Contreras-Sweet’s offer was “illusory.”

Here’s the Contreras-Sweet’s full statement:

Our team is pleased to announce that we have taken an important step and have reached an agreement to purchase assets from The Weinstein Company in order to launch a new company, with a new board and a new vision that embodies the principles that we have stood by since we began this process last fall. Those principles have never wavered and have always been to build a movie studio led by a board of directors made up of a majority of independent women, save about 150 jobs, protect the small businesses who are owed money and create a victims’ compensation fund that would supplement existing insurance coverage for those who have been harmed. The cornerstone of our plan has been to launch a new company that represents the best practices in corporate governance and transparency.

This next step represents the best possible pathway to support victims and protect employees.

We are grateful to the New York State Attorney General’s office for their efforts in helping us reach an agreement and we are grateful to our investors who have believed in this process and in the compelling value of a female-led company. We also want to thank all the parties who returned to the negotiating table to help us reach this development.

I have had a long-standing commitment to fostering women ownership in business. This potential deal is an important step to that end.