Bank of America Reaches Settlement With Fannie Mae

In this photo from Dec. 19, 2012, people walk past a Bank of America branch in Philadelphia.
Associated Press + More

CHARLOTTE, N.C. (AP) — Bank of America has reached a settlement with Fannie Mae on residential mortgage loans sold by the bank and its Countrywide unit to the agency ahead of the nation's 2008 financial crisis.

The settlement includes a $3.6 billion payment to Fannie Mae. Bank of America will also buy back some of the loans sold to Fannie Mae for $6.75 billion.

[READ: Bank of America Lawsuit Reveals Why Getting a Mortgage Is So Hard]

Its stock gained more than 2 percent in premarket trading.

Bank of America bought Countrywide Financial Corp. in July 2008, just before the financial crisis. Countrywide was a giant in mortgage lending, but was also known for approving risky loans.

Bank of America Corp. also said Monday that it is also selling mortgage servicing rights on about 2 million loans.

[READ: Why the Housing Market Can't Move On Without More First-Time Homebuyers]

The bank will take some charges, but expects "modestly positive" fourth-quarter earnings.

Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.