Bank of America Corp agreed to pay Fannie Mae and Freddie Mac $2.8 billion to settle claims that it sold the mortgage finance companies bad home loans, signaling that the bank may be closer to containing its outsized housing losses.

The news sent Bank of America shares up 5.5 percent to $14.08 in midday trading on the New York Stock Exchange. The deal triggered hopes that other banks may soon make similar settlements, and shares of Citigroup Inc and JP Morgan Chse & Co. also rose.

Investors have feared for months that Bank of America would have to buy back billions of dollars of home loans it sold to investors at the height of the housing boom.

Bank of America Corp agreed to pay Fannie Mae and Freddie Mac $2.8 billion to settle claims that it sold the mortgage finance companies bad home loans, signaling that the bank may be closer to containing its outsized housing losses.

The news sent Bank of America shares up 5.5 percent to $14.08 in midday trading on the New York Stock Exchange. The deal triggered hopes that other banks may soon make similar settlements, and shares of Citigroup Inc and JP Morgan Chse & Co. also rose.

Investors have feared for months that Bank of America would have to buy back billions of dollars of home loans it sold to investors at the height of the housing boom.