A group of investors on Thursday said that it had reached a $500 million agreement to buy the Weinstein Co., reviving a deal that just days before seemed to be dead, despite the high-profile intervention of New York state Attorney General Eric Schneiderman.

The group, led by Maria Contreras-Sweet, agreed to purchase more than 90 percent of the embattled film studio's assets, including its television business and catalog of films, according to The Wall Street Journal. The buyers would pick up $225 million in Weinstein Co. debt and invest about $275 million to launch a new company, the paper reported Thursday night.

The agreement, for now, staved off what appeared to be an imminent bankruptcy and purported to establish a settlement fund for the victims of sexual abuse on the part of disgraced movie mogul and company co-founder Harvey Weinstein.

The agreement was also seen as vindication for Schneiderman, who in February sued the Weinstein Co. in New York state court, fearing that a sale could result in an unfair windfall for the company's executives while not adequately protecting victims.

The film producer has been accused of sexual harassment and assault by dozens of women. He has denied allegations of engaging in nonconsensual sex. He was kicked out of the Academy of Motion Picture Arts and Sciences in the wake of the scandal.

In a statement, Schneiderman said the Contreras-Sweet-led group, which included investor Ron Burkle, agreed to create a compensation fund and enact policies to protect employees from harassment and abuse. The deal, he said, would ensure that Weinstein Co. directors who supposedly turned a blind eye to Harvey Weinstein's behavior would “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,” Schneiderman said. “We will work with the parties in the weeks ahead to ensure that the parties honor and memorialize these commitments prior to closing.”

Schneiderman said that the lawsuit will remain active and his office's investigation would remain ongoing.

Schneiderman sued Weinstein Co. Feb. 11, using a broad provision of New York law that authorizes the state to file suit against a company for “fraudulent or illegal acts” perpetrated against its citizens.

However, experts said it also had the potential to scare off potential buyers, driving down the company's value and the assets available to Harvey Weinstein's victims. That, in turn, could lead the company to file for bankruptcy, which would slow litigation and leave it up to a judge to determine the relative order for the distribution of assets among the company's creditors and plaintiffs, and shareholders.

“The last thing they wanted were buyers getting scared off and leaving town,” said Eric Talley, a professor at Columbia Law School who specializes in corporate governance and finance.

Still, the company appeared earlier this week to be on the verge of bankruptcy after negotiations between the company and the buyers broke down Sunday night over disagreements on how to compensate victims, protect employees and hold executives accountable.

“We are disappointed that despite a clear path forward on those issues—including the buyer's commitment to dedicate up to $90 million to victim compensation and implement gold-plated HR policies—the parties were unable to resolve their financial differences,” Schneiderman spokesman Eric Soufer said in a statement on Monday.

But the turnaround came three days later, after the sides huddled at Schneiderman's office in hopes of finally reaching a deal. According to media reports, Contreras-Sweet and the talks included a settlement fund of up to $90 million to pay victims.

However, it remained unclear whether that total would be enough to adequately compensate all of the potential plaintiffs. While some civil cases have been filed, there has been no real accounting of damages, and it is not yet known how many victims will file suit.

“I just don't think we know the answer from publicly available information yet,” Talley said.

There also remains the possibility that Weinstein Co. shareholders will file derivative lawsuits if they think they were shortchanged on their original investment in the firm. Under the Caremark theory, investors could argue that Weinstein Co. directors should assume personal liability for corporate harm on the basis that they were aware of a systemic problem but failed to act.

However, the prospects for derivative litigation remain unclear given the Weinstein Co.'s status as a privately held firm.