Navient Corp. (NAVI​), the largest student loan servicing company in the U.S., has reached an agreement with JPMorgan Chase & Co. (JPM) for the purchase of the latter's $6.9 billion portfolio of student loans. (See also: JPMorgan Tries TV Stars, Political Muscle to Regain Mortgage Footing.)

This comes only a few days after JPMorgan, during its Q1 earnings call, told investors that it was considering selling off the holdings while noting that it booked a write-down of about $160 million on its student loans. The bank had made known its intention to stop making student loans in 2013.

The historical aggregate student loan debt levels have been on the rise in over a decade, but with rising interest rates on student loans, students now look for other options such as personal loans for financing their education.

Navient said the portfolio of student loans include roughly $3.7 billion in student loans guaranteed by the federal government, $1.6 billion of which are securitized​. It also includes roughly $3.2 billion in whole private education loan. Navient didn’t disclose the terms of the deal. The loan servicing company plans to convert the loans to its serving platform in future. It also expects that the deal will be completed in stages in the course of the second quarter, adding that the transaction will be accretive to earnings this year. The student loan servicing company had announced a similar purchase of an $8.5 billion portfolio of federally guaranteed student loans from Wells Fargo in 2014. (See also: Student Loan Forgiveness: How Does It Work?)

Navient is currently contesting the lawsuits brought against it by federal and state officials alleging that the student loan servicer provided student loan borrowers with incorrect payment information, processed payments wrongly and failed to act when borrowers filed complaints.

The announcement of the agreement with JPMorgan came just before Navient announced its first quarter results. Navient said it earned 30 cents per share in the first quarter, down from the 53 cents per share it reported for Q1 2016. Analysts polled by Zacks investment Research had modeled for an EPS of 43 cents per share.

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.