The families of the 17 students and staffers killed in the 2018 mass shooting at Marjory Stoneman Douglas High School in Parkland, Fla., and dozens who were injured or traumatized reached a $25 million settlement with the school district Tuesday ahead of a guilty plea by accused shooter Nikolas Cruz, according to a lawyer representing some of the families.

Attorney David Brill said the largest chunk of the settlement with Broward County Public Schools would be split among the families of the 14 students and three faculty members killed on Feb. 14, 2018, in one of the deadliest school massacres in the nation’s history. The agreement settles 52 of the 53 negligence lawsuits filed against the school district over the shooting. The settlement includes 16 of the 17 people injured in the attack and 19 suffering from PTSD or other conditions years later.

“It’s a fair and frankly remarkable result,” Brill said in a statement. “It gives the families a measure of justice and accountability.”

A spokesperson for Broward County Public Schools said the district would not comment on the settlement or pending litigation.

The settlement, which was first reported by the Fort Lauderdale-based Sun Sentinel, came a day before Cruz, a former student at the school, pleaded guilty Wednesday to 17 counts of premeditated murder and 17 counts of attempted murder.

The plea sets the stage for a trial focusing on whether Cruz, 23, will be sentenced to death. Prosecutors are asking for the death penalty, but Cruz’s defense team is seeking 17 consecutive life sentences for him.

The rampage at the South Florida high school set off a legal back-and-forth for more than 3½ years between family members of victims and the Broward school district over the district’s alleged negligence. During that time, Parkland students helped to inspire a nationwide movement advocating for gun control legislation and greater school safety. Since the 1999 massacre at Columbine High School in Colorado, more than 256,000 students have experienced gun violence at school, according to a Washington Post analysis in August.

Brill did not specify how much each family would receive or indicate how the rest of the money would be divided. Any single victim in Florida is prohibited from collecting more than $300,000 in a government settlement without approval from the state legislature, according to state law.

But the attorney noted to local media that an arrangement has been worked out enabling the victims’ families to collect without having to wait for approval from the Florida government.

Andrew Pollack, whose 18-year-old daughter, Meadow, died in the shooting, described the settlement to the Sun Sentinel as “painful money.”

“It’s hard to talk about money because your daughter was murdered,” he said. “How could you be happy about it?”

The one lawsuit not covered in the settlement involves Anthony Borges, a former student who was shot several times in his legs, lungs and abdomen. Brill told the Sun Sentinel that “there was a concern by the rest of the families that Borges was just demanding more than the fair share,” and potentially jeopardized the settlement.

Alex Arreaza, Borges’s attorney, did not immediately respond to a request for comment early Wednesday. Arreaza told the New York Times that Borges, one of the most severely injured survivors, was seeking a larger individual payment to help cover the cost of the lifelong care he needs. He indicated that Borges would reach a settlement in the coming days.

“The other parents will always say, ‘At least your child is alive,’ ” Arreaza told the Sun Sentinel. “Out of all the 34 people [killed or injured], my client is the one that has the biggest doctor’s bill.”

Even with the settlement, other families still have lawsuits pending against the Broward County Sheriff’s Office and Scot Peterson, the school’s former armed resource officer who failed to enter the building to confront Cruz. Peterson, who also faces criminal charges, has previously said he did not know where the shots were coming from, according to the Associated Press.

Those families also are suing two security guards who they claim did not respond when Cruz arrived at the campus.

Although Brill praised the settlement, he emphasized that the money would not come close to making up for the damage done in the 2018 massacre.

“There isn’t enough money in existence that would compensate the victims and their families adequately,” Brill said. “Indeed, there isn’t enough money in existence to do that.”

Derek Hawkins and Mark Berman contributed to this report.

Read more: