Bank of America on Monday morning agreed to pay $2.8 billion to Fannie Mae and Freddie Mac to resolve outstanding repurchase requests on loans Countrywide Financial Corp. sold to the GSEs.

"These actions resolve substantial legacy issues in the best interests of our shareholders," said B of A president and chief executive Brian Moynihan.

Countrywide was bought by Bank of America in August 2008. For much of the decade the lender (perennially the nation's largest) had a "strategic alliance" agreement with Fannie whereby it sold a large majority of its conventional production to the GSE in exchange for a low 'g-fee' payment and other benefits.

Year after year, Countrywide was the largest seller of home mortgages to Fannie.

The $1.28 billion settlement with Freddie covers a pipeline of repurchase demands on loans Countrywide sold to Freddie through 2008, according to a statement released by B of A, the nation's largest servicer of residential loans.

The bank's settlement with Fannie resolves existing repurchase requests as of September 20, 2010 on loans Countrywide sold the government sponsored enterprises during the housing boom.

Bank of America made a $1.34 billion cash payment to Fannie "after applying certain credits to the agreed-upon amount of $1.52 billion," the bank said.

Fannie said it continues to work with B of A to "resolve repurchase requests that remain outstanding, including requests related to loans delivered to the company by Bank of America, N.A."

Subscribe Now

Access to a full range of industry content, analysis and expert commentary.

30-Day Free Trial

No credit card required. Access coverage of the securitization marketplace, including breaking news updated throughout the day.