(Reuters) -Navient Corp, one of the largest U.S. student loan companies, has reached a $1.85 billion settlement with most U.S. states to resolve accusations it steered borrowers into predatory loans and costly repayment packages.

The accord with 38 U.S. states and Washington, D.C. resolves several lawsuits into practices dating back many years, including when Navient was known as Sallie Mae.

Navient will cancel about $1.7 billion of subprime loan balances for about 66,000 borrowers whose loans were largely made between 2002 and 2010 and later went into default.

The company will also pay $95 million in restitution to more than 350,000 borrowers.

Navient estimated it will pay $145 million overall to the states, including to reimburse their costs.

The company denied violating any law or causing borrower harm in agreeing to settle.

“The company’s decision to resolve these matters, which were based on unfounded claims, allows us to avoid the additional burden, expense, time and distraction to prevail in court,” Chief Legal Officer Mark Heleen said in a statement.

(Reporting by Chris Prentice in Washington, D.C. and Jonathan Stempel in New York; Editing by Diane Craft)