Justin Sullivan/Getty Images

Citigroup said on Monday that it had agreed to pay the mortgage finance giant Fannie Mae $968 million to resolve any claims on 3.7 million mortgage loans that might sour.

The company said the settlement would apply to troubled loans as well as any potential future claims on loans that originated between 2000 and 2012 that were purchased by Fannie Mae, which was bailed out by the government during the financial crisis.

Related Links Document: News release

“We have a strong and productive relationship with Fannie Mae,” Jane Fraser, chief executive of CitiMortgage, said in a statement. “As we work to deepen and enhance financial relationships with our clients, we will continue to focus on the production of high-quality mortgage loans.”

The company will continue to service the mortgage loans covered under the deal. Citigroup said most of the settlement amount was covered by the bank’s existing mortgage repurchase reserves. As part of its quarterly plan, it will add $245 million in the second quarter to its reserve.

In a statement, Bradley Lerman, executive vice president and general counsel of Fannie Mae said: “Today’s agreement resolves legacy repurchase issues, compensates taxpayers for losses, and allows Fannie Mae and Citi to move forward and strengthen our business relationship.” The company said it would continue to work with other lenders on similar resolutions.

Citigroup, like many other banks, sold off millions in mortgages to the government, which repackaged them into mortgage-backed securities. Many times, borrowers defaulted — sometimes within months of taking out a mortgage — causing huge losses for the taxpayer-supported Fannie Mae.

In January, Bank of America agreed to pay Fannie Mae about $3.6 billion to compensate for faulty mortgages and $6.75 billion to buy back mortgages that could have resulted in future losses for the government. The bank also agreed to sell to other firms the right to collect payments on $306 billion worth of home loans.