NEW YORK (AP) — A tentative deal has been reached to settle multiple lawsuits brought against the television and film company co-founded by Harvey Weinstein, who has been accused of sexual misconduct by scores of women.

Attorneys involved in the negotiations told a federal bankruptcy court judge during a hearing in Wilmington, Delaware, Thursday that a breakthrough in a still-unfinished mediation had put a settlement within reach.

The amount of the deal wasn’t revealed in court, but a person familiar with the negotiations told The Associated Press it was worth $44 million. The person wasn’t authorized to reveal details of the discussions and spoke on condition of anonymity.

“We now have an economic agreement in principal that is supported by the plaintiffs, the (New York attorney general’s) office, the defendants and all of the insurers that, if approved, would provide significant compensation to victims, creditors and the estate and allow the parties to avoid years of costly, time consuming and uncertain litigation on all sides,” Adam Harris, a lawyer for studio co-founder Bob Weinstein, told the judge.

He cautioned that there was still “a lot of work here to do.”

“But,” he added, “I personally am very optimistic.”

The size of the settlement was first reported by The Wall Street Journal.

More than 15 lawsuits have been filed accusing Harvey Weinstein or the company of misconduct. The settlement would cover many of them, including a class action by alleged victims that accuses the film company of operating like an organized crime group to conceal widespread sexual harassment and assaults.

It would also resolve a civil suit by the New York attorney general alleging that Harvey Weinstein’s media company, in enabling his mistreatment of women, violated labor laws.

The New York attorney general’s office declined to comment on the amount of the settlement.

Any settlement would need to be approved by the courts.

Harvey Weinstein also faces criminal charges in New York of rape and performing a forcible sex act. His trial is scheduled to begin in September. The settlement wouldn’t resolve his criminal case.

Weinstein denies all allegations of nonconsensual sex.

An attorney who represents unsecured creditors in the bankruptcy of the Weinstein film studio, Robert Feinstein, told U.S. Bankruptcy Court Judge Mary Walrath that mediation talks that had broken down a few months ago had recently been restarted.

A global settlement of the class action lawsuit and all other legal action against the Weinstein Co. seemed to become possible only in the past few days, he said, though he cautioned that many details remained to be resolved.

“I think we are poised to get there. I can’t assure the court that we will,” he said.

Harris said the settlement was complex due to the number of claims, and insurance companies, involved.

“We’re dealing with potential claims here that go back. more than 25 years,” he said, adding that the nature of the allegations had also made for “a highly charged environment, with very strong feelings on all sides.”