Citigroup is set to exit its US mortgage-servicing business by the end of 2018 and instead focus on originations in order to improve returns on capital and reduce costs.

The New-York based lender said that it would sell mortgage servicing rights on about 780,000 Fannie Mae and Freddie Mac loans of non-Citibank retail customers with outstanding balances of around $97bn to New Residential Mortgage (NRZ). The transaction is expected to close in the first half of 2017, subject to regulatory nod.

The remaining Citi-owned loans and other mortgage servicing rights that are not sold to NRZ will be transferred to loan servicing provider Cenlar FSB, starting in 2018.

CitiMortgage president and CEO CD Davies said:  “Over the past several years, we have made significant progress transforming our business to deliver a sustainable annuity of growth.

“CitiMortgage remains a critical part of serving our customers, deepening relationships with existing and prospective retail bank clients and driving growth in our core markets. We will continue to originate loans for current and new clients.”

The New-York based lender said that the move will lower its pretax earnings by $400m in the first-quarter, including a loss on the sale and certain related transaction costs.