The U.S. Department of Education has agreed to cancel the student loans of around 200,000 people who brought a class-action lawsuit against the government, claiming they were stuck with federal debts from schools that were found to have misled them.

Under the terms of the Sweet v. Cardona settlement, the Education Department will immediately approve around $6 billion in debt forgiveness. The 200,000 borrowers eligible for the relief will get full cancellation of their debt, refunds of amounts paid and repair to their credit.

More from Personal Finance:
100 million adults have health-care debt
Millions of tax returns remain unprocessed
Student loan forgiveness a working class issue, Schumer says

The plaintiffs brought their lawsuit against the Trump administration in 2019, representing around 264,000 class members who said their applications for loan cancellation were being ignored by the Education Department. The suit name was later changed from Sweet v. DeVos to Sweet v. Cardona after current U.S. Secretary of Education Miguel Cardona replaced former Trump appointee Betsy DeVos.

“This momentous proposed settlement will deliver answers and certainty to borrowers who have fought long and hard for a fair resolution of their borrower defense claims after being cheated by their schools and ignored or even rejected by their government,” said Eileen Connor, director of the Project on Predatory Student Lending at Harvard Law School.

The project compiled a list of the dozens of schools that are involved in the settlement and that the Education Department has determined engaged in misconduct.

“Since day one, the Biden-Harris Administration has worked to address longstanding issues relating to the borrower defense process,” Cardona said in a statement.

“We are pleased to have worked with plaintiffs to reach an agreement that will deliver billions of dollars of automatic relief to approximately 200,000 borrowers and that we believe will resolve plaintiffs’ claims in a manner that is fair and equitable for all parties.”