Bank of America Corp on Friday revealed that its U.S. operations lost money in the second quarter as the quality of consumer and commercial loans deteriorated.

In its quarterly report filed with the U.S. Securities and Exchange Commission, the largest U.S. bank said it lost $255 million in the United States, and would have lost money elsewhere but for a $3.5 billion after-tax gain from a sale of part of its stake in China Construction Bank Corp.

Bank of America said non-U.S. operations generated a $3.43 billion profit, including the gain. Overall profit totaled $3.22 billion, and excluding the payment of preferred stock dividends totaled $2.42 billion.

The bank previously said it set aside $13.38 billion for bad loans for a second straight quarter, while net charge-offs rose 25 percent from the first quarter to $8.7 billion.

The results reflect the challenges that Charlotte, North Carolina-based Bank of America, like its rivals, faces in trying to build business while keeping credit losses down as economies worldwide try to emerge from a deep recession.

Kenneth Lewis, the bank's chief executive, last month said profitability in the second half of the year will be much tougher than the first half because of an expected absence of one-time gains, such as from the CCB stock sale. The bank still owns 11 percent of the Chinese bank.

Bank of America has taken $45 billion of federal bailout money, including $20 billion to help it absorb Merrill Lynch & Co, which it bought on Jan 1.

In the filing, Bank of America said Merrill businesses had a $1.8 billion second-quarter loss excluding merger costs, tax benefits and other items. For all of 2009, Merrill has had a $1.8 billion profit, the bank said.

Bank of America said one-fourth of its $32.77 billion of quarterly revenue, net of interest expense, came from outside the United States and Canada, up from 8 percent a year ago.

The bank aggregates U.S. and Canadian operations for its reporting of regional results. According to a footnote, it had a second-quarter profit of $50 million in Canada, which together with the U.S. loss resulted in what the bank called a $205 million domestic loss for the second quarter.

(Reporting by Jonathan Stempel; Editing by Richard Chang)