One of the country's largest student loan servicers has agreed to pay $2.4 million to settle charges that it failed to process struggling borrowers' applications for loan relief and harassed borrowers during the debt collection process.

Xerox Education Services, formerly known as ACS Education Services, "systemically" failed to properly process applications for the income-based repayment debt relief option, the attorney general's office alleged. Some $400,000 of the settlement money will go to borrowers in Massachusetts who Xerox prevented from enrolling in the program, in which monthly debt payments are fixed at a percentage of a borrower's income.

The settlement is the first of its kind between a state attorney general and a student loan servicer. The industry has come under heightened scrutiny in recent years, including from the Education Department, which has introduced new rules to prevent abuse of student borrowers, and the Consumer Financial Protection Bureau, which found "widespread' errors among servicers in a report last year.

Xerox has a troubled history of errors in student loan servicing. Last year, BuzzFeed News reported that Xerox's servicing of Federal Family Educational Loans made by major banks was the subject of an investigation by the CFPB over almost a decade's worth of errors that included overcharging borrowers.

The CFPB's 2015 report found that Xerox's servicing was riddled with problems, including a portfolio of 2.5 million loans where one in five accounts had errors.

Until 2013, Xerox had an exclusive contract with the Department of Education to mange some $140 billion of direct student loans owed by more than 10 million borrowers, in a program separate from the company’s FFEL loan portfolio. This massive government contract was not renewed because the company had “improperly handled” the servicing of the loans, an official said.

Spurred by activist investor Carl Icahn, Xerox split itself into two companies earlier this year, spinning off its troubled student loan business and other outsourcing operations.

Molly Hensley-Clancy is a politics reporter for BuzzFeed News and is based in Washington, DC.