HARRISBURG, Pa. — Pennsylvania’s attorney general accused the nation’s largest student loan company of engaging in abusive practices in a lawsuit filed Thursday that alleged it has improperly added billions of dollars in costs for borrowers.

The complaint in federal court in Harrisburg, Pennsylvania, said Navient Corp. and subsidiary Navient Solutions LLC sold “risky and expensive” subprime loans and damaged borrowers and co-signers by failing to perform core loan servicing duties.

“The evidence will likely show that (1) there has been a profound impact on the financial lives of borrowers who were sold risky subprime loans by the defendants, (2) many borrowers have had to delay starting a family, (3) many borrowers have been unable to save for the down payment on a home, and (4) others have not been able to start their own business,” the lawsuit alleged.

It claims the companies funneled people into a program that added massive interest costs when they should have been directing them into repayment plans indexed to income.

A statement from Navient called the allegations completely unfounded and said it complies with federal rules for student loans.

The lawsuit accuses Navient of violating state and federal consumer protection laws and seeks a court order directing them to change practices, make restitution to borrowers and pay back any profits they made from the alleged practices.

Pennsylvania Attorney General Josh Shapiro, a Democrat, in a statement accused Navient of putting its interests ahead of the families who took out loans. He said the case could affect hundreds of thousands of state residents.

“They crossed the line in pursuit of profit and we’re here to change their behavior and help the people who’ve been harmed,” Shapiro said.

Shapiro’s agency said that as of last month, more than 1,000 Pennsylvanians had filed complaints about Navient with the Consumer Financial Protection Bureau.

The lawsuit claims Navient makes loans for schools with low graduation rates, knowing many will not be able to repay them, and pushes borrowers into short-term “loan forbearances” that add costs rather than helping them enroll in repayment plans linked to income levels and family size.

Navient’s customer service representatives, the lawsuit claims, are given average-call-time financial incentives that encourage them to enroll people in forbearance rather than the income-driven repayment plans.

Navient has a student loan servicing center in Wilkes-Barre with about 1,000 employees.

Earlier this year, the Consumer Financial Protection Bureau, Illinois and Washington state also sued over the loan practices. Navient has denied those allegations and said the lawsuits will drive up loan costs.