Bank of America will pay $404 million to mortgage buyer Freddie Mac to settle all remaining claims over home loans sold in the previous decade.

The Charlotte, N.C., bank says the deal resolves claims on loans sold from 2000 through 2009, which includes mortgage-backed investments that soured during the housing crash. The bank’s reserves will cover the payment.

Earlier this year, Bank of America Corp. agreed to pay $3.6 billion in cash to Freddie’s sibling company, Fannie Mae, and buy back $6.75 billion in loans sold by the bank and Countrywide Financial, which Bank of America bought in 2008.

Fannie Mae and Freddie Mac buy mortgages from banks and package them as bonds to sell. The government rescued both during the financial crisis in 2008 with loans of about $187 billion. So far, they have repaid about $136 billion of that aid.