The Los Angeles school district reached an $88 million settlement in 30 sexual abuse cases at two elementary schools, officials said Monday. The settlement, finalized over the weekend, is the second largest in the history of the Los Angeles Unified School District (LAUSD), according to the Los Angeles Times.

The sexual misconduct cases involved 18 children at De La Torre Elementary School in Wilmington and another 12 students — all minors — at Telfair Avenue Elementary School in Pacoima. These two schools serve low-income students. According to the Times, the average payment will be about $3 million per family, including sums that two Telfair students won through a jury verdict last year.

“We’re glad that we’re able to resolve both of these cases so we can avoid potentially painful litigation and put these cases behind us,” Gregory McNair, a senior attorney with the district, said, according to the Times.

Veteran teachers’ conduct toward students at the two schools, and a third Miramonte Elementary School, had reportedly raised questions in the past. Miramonte teacher Mark Berndt was arrested in 2012 for sexual misconduct and has been serving a 25-year jail sentence. At the time, the district reached a $175 million settlement in the case.

Officials said that Telfair teacher Paul Chapel III sexually abused several students over a decade, for which he is already serving a 25-year sentence after a no-contest plea, the Times reported. De La Torre teacher Robert Pimentel was sentenced to 12 years in prison after he pled no contest to sexually abusing four girls, including a relative.

John Manly, attorney for the complainants, compared the school district’s handling of the cases to the Roman Catholic Church’s failure to stop child abuse by priests, the Times reported.

“We feel this is an ongoing problem in L.A. Unified and we hope this amount of money will promote a change of heart and change of attitude when it comes to victims,” Manly reportedly said.

These cases reportedly pushed the school district to perform job documenting allegations against the teachers. The district, which enrolls over 650,000 students, set up a special investigations unit and now concentrates on better training for recognizing and reporting abuse, the newspaper reported.