New York Attorney General Letitia James announced Tuesday a nearly $19 million compensation fund for women who were victimized by disgraced ex-movie producer Harvey Weinstein.

If the district and bankruptcy courts sign off on the deal, the payments would resolve the state attorney general's lawsuit and a separately filed class action suit brought by victims of Weinstein, according to James' office.

Her office says the agreement would also release women from nondisclosure agreements they signed with The Weinstein Co., or its former representatives, tied to Weinstein's sexual misconduct. Nondisclosure agreements, the office said, were used to prevent former workers from talking about what they experienced.

The compensation fund would be made up of $18,875,000, according to the state attorney general's office, and restitution would be available to "women who experienced a hostile work environment, sexual harassment, and gender-based discrimination while working at The Weinstein Company, as well as sexual abuse by Harvey Weinstein."

Weinstein was sentenced to 23 years in prison in March after being convicted on criminal sexual act and third-degree rape charges. He also faces criminal charges, including forcible rape, in California.

James described the agreement as a win for all women who have faced sexual harassment and intimidation from their employer.

"Harvey Weinstein and The Weinstein Company failed their female employees," she said in a statement. "After all the harassment, threats, and discrimination, these survivors are finally receiving some justice."

James also thanked the women who came forward to tell their stories, saying she will "forever carry their stories in my heart and never stop fighting for the right of every single person to be able to work harassment-free."

Lawyers involved in the class action lawsuit praised the settlement agreement, too. Elizabeth A. Fegan said it was selfless for the plaintiffs to use a class action to broker a confidential process "where all survivors can apply for meaningful relief."

"This settlement is the culmination of several years of hard work by survivors who not only initiated the #MeToo movement around Weinstein, but also used their platforms to seek justice for all of those who were afraid to come forward for fear of retaliation in Hollywood," she said in a statement.

Douglas H. Wigdor and Kevin Mintzer, who represent Weinstein accusers, decried the settlement as unfair and said Weinstein does not accept responsibility for his actions. In a joint statement, the attorneys said they will be objecting in court.

"The proposed settlement is a complete sellout of the Weinstein survivors and we are surprised that the Attorney General could somehow boast about a proposal that fails on so many different levels," they said in a statement.

"We are completely astounded that the Attorney General is taking a victory lap for this unfair and inequitable proposal," the statement read.

The agreement caps off more than two years of litigation and investigation, which included an "exhaustive" review of company records and email, according to James' office.

The state attorney general's 2018 lawsuit accused Weinstein of creating a hostile work environment by sexually harassing female workers. That behavior involved berating the employees and requiring them to work while he was naked or only partially clothed, according to James' office. The suit also accused The Weinstein Co. of failing to investigate misconduct complaints and take appropriate action to stop Weinstein.

Attorney Imran Ansari said in a statement that Weinstein "remains intently focused in defending himself on all remaining legal matters."

"He continues to pursue all legal recourse available to him and remains steadfast in the defense of those matters," the statement said.

This is a developing report.

READ MORE: