DETROIT (AP) — The state of Michigan has agreed to pay $80 million to settle a class-action lawsuit on behalf of male teens who said they were sexually assaulted in prison while housed with adults, officials said Thursday.

The deal closes years of litigation. The lawsuit accused the Corrections Department of failing to prevent the assaults, especially abuse that was “open and obvious.”

READ MORE: Consumer Alert: How To Avoid Fake N95, KN95 Masks

The department had denied the allegations and aggressively fought the lawsuit by appealing key rulings. It said it wasn’t able to corroborate the allegations.

But Attorney General Dana Nessel said the settlement “allows us to move forward and brings closure for the inmates.”

It’s unclear how many people could get a share of the settlement, although the state said the lawsuit was filed on behalf of more than 1,300.

READ MORE: Flint Public Schools Staying Virtual Indefinitely Due To Large Amount Of Positive COVID-19 Cases

“I believe prisoners are entitled to be treated with respect and basic human dignity,” Nessel said. “I know MDOC has made significant strides under the leadership of Director Washington and that the past seven years of litigation do not reflect the values of her administration or the current reality of life inside Michigan’s prison system.”

She was referring to Heidi Washington, who became prisons director after the lawsuit was filed.

Michigan male teens younger than 18 no longer are housed with adults and are assigned to a prison in Lapeer. Female teens are kept apart from women at a prison near Ypsilanti.

In 2009, the state agreed to pay $100 million to hundreds of female prisoners who said they were assaulted or harassed by male guards.

MORE NEWS: State Fears Confusion After Michigan Restaurant Wins In Dining Ban Case

© 2020 Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.