Citigroup's results surprised even the most liberal analysts, as profits jumped. Reuters

Citigroup Inc (NYSE:C) will pay the government controlled-mortgage company, Fannie Mae (NYSE:FNME), nearly $1 billion after breaching guarantees of loan quality on 3.7 million mortgages sold between 2000 and 2012.

The $968 million settlement is another step in righting the wrongs of the mortgage crisis that cost the industry tens of billions of dollars in compensation, fines and lawsuits.

Freddie Mac is not included in the settlement. Banks have spent years negotiating the compensation amount for mortgagees that were underwritten to borrowers who defaulted on the loans.

Citi will pay the loans from its reserves, which it say will be topped up by $245 million when second-quarter earnings reports are due in two weeks.

Jane Fraser, the new head of Citi’s mortgage division, said: “We have a strong and productive relationship with Fannie Mae. This agreement resolves substantially all potential future repurchase claims from them for loan originations from 2000 to 2012.”

In a similar deal struck in January, Bank of America agreed to pay $3.6 billion to Fannie Mae and repurchase $6.75 billion of mortgages.