Bank of America and its Countrywide unit will pay $8.5 billion to settle claims that the lenders sold poor-quality mortgage-backed securities that went sour when the housing market collapsed. The Charlotte bank says the settlement covers 530 trusts with original principal balance of $424 billion. "This is another important step we are taking in the interest of our shareholders to minimize the impact of future economic uncertainty and put legacy issues behind us," Bank of America Chief Executive Brian Moynihan said in a statement. "We will continue to act aggressively, and in the best interest of our shareholders, to clean up the mortgage issues largely stemming from our purchase of Countrywide." The settlement is subject to court approval. As a result of the settlement, Bank of America says it will register a loss of between $8.6 billion and $9.1 billion. The payout is the latest effect of the bank's purchase of Countrywide in 2008. In January, Bank of America made a $2.8 billion settlement over similar claims from government-backed Fannie Mae and Freddie Mac. Today's agreement resolves a much larger dispute with large, private investors that also bought securities backed by Countrywide mortgages.