A $500 million deal to save The Weinstein Co. from bankruptcy was reached, according to the troubled film company and the investor group led by Ron Burkle and Maria Contreras-Sweet.

Variety reported that the agreement was reached on March 1 after a “marathon negotiation” session in the office of New York Attorney General Eric Schneiderman.

The deal for the assets of TWC “provides a clear path for compensation for victims and protects the jobs of our employees,” according to a statement released by the film company.

TWC co-founder Harvey Weinstein has been accused of rape and sexual harassment by more than 25 women. He was fired from the company and resigned from the board in October.