Citigroup Inc., the third-largest U.S. bank by assets, agreed to pay Fannie Mae $968 million to settle claims tied to more than a decade’s worth of defective home loans sold to the taxpayer-backed mortgage firm.

The agreement includes 3.7 million mortgages originated between 2000 and 2012, the New York-based bank said today in a statement. While the payments were covered by existing reserves, the bank said it will set aside an additional $245 million in the second quarter. Results will be reported on July 15.

Citigroup joins firms including Bank of America Corp. in settling claims that they failed to check details such as borrowers’ income when they created home loans. Lenders typically promise to provide refunds if such flaws are later found in documents backing the mortgages.

Citigroup said the accord resolves “substantially all potential future repurchase claims.” It doesn’t release the bank from liability tied to servicing the loans. The agreement also doesn’t cover a group of fewer than 12,000 loans made from 2000 to 2012, the bank 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, Bradley Lerman, Fannie Mae’s general counsel, said in an e- mailed statement.

Citigroup had set aside $1.42 billion at the end of March to cover demands to buy back bad mortgages, according to an April 15 presentation. The bank didn’t say how much of those were tied to Fannie Mae.

Litigation and repurchase costs connected to defective mortgages have cost Citigroup more than $4 billion since 2007, according to data compiled by Bloomberg. Charlotte, North Carolina-based Bank of America, ranked second by assets, agreed to an $11.7 billion settlement with Fannie Mae in January.