UPDATED with board statement: The board of directors at The Weinstein Company — Tarak Ben Ammar, Lance Maerov and Bob Weinstein — are now confirming the deal to sell the company’s assets to the investor group led by Maria Contreras-Sweet and Ron Burkle. So is New York Attorney General Eric T. Schneiderman.

First is the statement by the board, and then the AG.

“We are pleased to announce that we have entered into an agreement to sell the assets of The Weinstein Company to an investor group led by Maria Contreras-Sweet and Ron Burkle,” said the Board. “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.”

This from Schneiderman:

“As I made clear from the start, our office will support a deal that ensures victims will be adequately compensated, employees will be protected moving forward, and those who were responsible for misconduct at TWC will not be unjustly rewarded.

As part of these negotiations, we are pleased to have received express commitments from the parties that the new company will create a real, well-funded victims compensation fund, implement HR policies that will protect all employees, and will not unjustly reward bad actors. We will work with the parties in the weeks ahead to ensure that the parties honor and memorialize these commitments prior to closing. Our lawsuit remains active and investigation remains ongoing at this time.”

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 Schneiderman, whose 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.