The lender had in November said it would stop issuing mortgage and home equity loans, after rising interest rates pushed away borrowers and slowed loan growth.

"Strong market demand enabled us to negotiate and sign this complex transaction more quickly than we thought possible," R. Scott Blackley, chief financial officer of Capital One, said.

Capital One said it expects to record a gain from the sale of the mortgage portfolio in the second quarter of 2018 and would resume buying back shares at the end of the quarter.

Capital One's shares rose 2.6 percent at $91.2 in early trading.

Wells Fargo and Morgan Stanley were the financial advisors to Capital One, while Wachtell, Lipton, Rosen & Katz was its legal counsel.

(Reporting By Aparajita Saxena in Bengaluru; Editing by Arun Koyyur)