Bank of America announced Monday that it will pay housing giant Fannie Mae some $10 billion due to mortgage loans issued by a subsidiary of the bank.

The bank will pay Fannie Mae $3.6 billion in the settlement, and will also buy back some $6.75 billion in loans that it sold to the housing group.

Bank of America’s settlement with Fannie Mae grew out of loans issued by Countrywide Financial between 2000 and 2008.

Federal authorities have charged that Countrywide, which Bank of America purchased in 2008, issued dicey mortgage loans, but led Fannie Mae and another housing giant, Freddie Mac, into thinking those loans weren’t risky.