Thousands of people who have been sued over past-due education debt are set to receive restitution from a $21.6 million government settlement with one of the largest owners of private student loans, National Collegiate Student Loan Trusts.

On Monday, the Consumer Financial Protection Bureau (CFPB) said National Collegiate and its debt collector, Transworld Systems Inc. (TSI), filed lawsuits that relied on false or misleading legal documents. Those cases often involved the collection of debt that the company could not prove that it owned or that consumers owed, according to the CFPB complaint.

National Collegiate comprises 15 trusts that own more than 800,000 private student loans. In the lead-up to the 2008 financial crash, the trusts purchased and securitized loans and then sold notes to investors, a scheme that mirrored what occurred at the same time in the housing market. And as in the subprime mortgage crisis, the paperwork associated with those student loans was often flawed or incomplete, the complaint said.

As people defaulted on those private student loans in droves, National Collegiate hired Transworld to collect. Between November 2012 and April 2016, the debt collection agency initiated nearly 95,000 lawsuits across the country. Investigators at the CFPB identified more than 2,000 suits in which National Collegiate could neither produce proof of ownership of the debt or a promissory note, which borrowers sign promising to repay the loan.

Nevertheless, Transworld employees signed sworn affidavits claiming to have reviewed account records they never read, according to the complaint. Investigators say the collection agency at times instructed interns and mailroom clerks to execute affidavits when there were backlogs. These efforts helped yield National Collegiate more than $21 million in judgments against borrowers.

One of National Collegiate’s financiers had long raised concerns about the collection practices. Donald Uderitz, the founder of private-equity firm Vantage Capital Group (VCG), is the beneficial owner of the trusts, meaning his company receives any money remaining after noteholders are paid. Uderitz, as first reported by the New York Times, hired an auditor in 2015 to review the work of the company charged with handling loan payments and maintaining custody of the loan documents, the Pennsylvania Higher Education Assistance Agency (PHEAA).

That audit found that none of the random sample of nearly 400 loans had documentation of the chain of ownership, and in March 2016 Uderitz filed a lawsuit against the PHEAA, which also handles student loans for the federal government.

“We frankly welcomed the intervention of the CFPB to help us to put an end to these appalling practices,” Uderitz said in a statement. “VCG has been investigating these issues for the last three years but have been consistently stonewalled from taking the necessary corrective action until now.”

Uderitz said he intends to recover the money the trusts must pay out under the CFPB agreement from the loan servicing company.

“PHEAA was not responsible to create, confirm, or establish the existence of, any sale documentation establishing the chain of ownership of the loans from the originators, prior lenders or prior owners to the Trusts,” PHEAA spokesman Keith New said in an email. “PHEAA acts solely as a contract servicer, and as a custodian of certain borrower-level documentation, for the Trusts in accordance with the requirements set forth in its contracts.”

For its part, Transworld issued a statement disagreeing with the CFPB’s characterization of the company and many of the claims in the consent order, but would not expound on the matter.

“TSI decided to settle with the CFPB in order to avoid costly and potentially protracted litigation with our primary regulator, and so that we may continue to focus all of our efforts on serving the needs of our customers,” the company said.

Under the terms of the settlement, Transworld must pay a $2.5 million penalty to the CFPB, while National Collegiate will hand over $7.8 million to the agency’s civil penalty fund and another $7.8 million to the U.S. treasury.

What’s more, National Collegiate was ordered to pay at least $3.5 million to more than 2,000 people who made payments after being wrongfully sued. Eligible borrowers will be contacted by the company.

The company must also hire an independent auditor to review all of its student loans. If the auditor finds that the company lacks the documentation to recoup those debts, the firm will have to cease collections on those loans and provide additional restitution.

Both companies are prohibited from suing without documentation as well as collecting and reporting negative credit information without documentation. They are also barred from filing false or misleading legal documents.

“This case is eerily familiar to the out-of-control mortgage market from a decade ago,” said Rohit Chopra, a senior fellow at the Consumer Federation of America and a former CFPB official. “Student loan borrowers will finally get some relief and some peace of mind.”