(Updated includes additional earnings call details; updated closing price.)

Bank of America's ( BAC) surprisingly strong second-quarter profit was unable to mask the underlying credit problems that stand to cause further pain ahead.

The Charlotte, N.C.-based bank topped expectations by earning $3.2 billion, or 33 cents per share, last quarter, reflecting strong results in capital markets and mortgage lending, as well as special gains. BofA's bottom line was either 5% or 25% below the year-ago quarter, depending on whether preferred dividends are factored in. Either way, it topped the average analyst prediction that BofA would earn 28 cents per share, according to Thomson Reuters, although expectations varied widely .

Still, results were affected by several one-time items, mostly on the positive side. Despite $7.3 billion in special charges, fees and value losses, BofA booked $9.1 billion in gains by selling some China Construction Bank stock and part of its merchant processing business into a joint venture. The bank also booked significant tax advantages related to troubled assets in the Merrill Lynch portfolio.

Performance from BofA's capital markets and mortgage businesses were robust. However, the first division is volatile, meaning that investment banking revenue may not rise 56% again next quarter if the markets become ill again. The second division is benefitting from government programs to keep interest rates artificially low, and lure mortgage-borrowers back into the marketplace.

As CEO Ken Lewis put it on a conference call, "Profitability in the second half of the year will be much tougher than the first half."

In a troubling sign, credit costs climbed across most of Bank of America's giant portfolio of consumer and business loans. The firm was forced to add $4.7 billion to reserves for expected future losses, which now stand at $36 billion.

BofA shares closed 2.1% lower Friday afternoon at $12.89.

The quarter was a reflection of tougher times for the broad economy, as consumers faced sharply higher unemployment and businesses shrank from waning demand. Regulators also disclosed the results of bank stress tests, showing BofA would need to raise Tier 1 capital by at least $33.9 billion -- more than any other -- to weather more severe economic stress.

Investors have been watching the results of high-profile banks like BofA to determine how far along in the economic crisis they may be. Also on Friday, Citigroup ( C) and General Electric ( GE) reported surprise profits, in an earnings season kicked off with surprisingly strong profits from Goldman Sachs ( GS) and JPMorgan Chase ( JPM).

Opinions seemed to be split on what the second-quarter results portend for the rest of the year. FBR's Paul Miller noted that BofA is "definitely ahead" of an earlier stated target of $45 billion to $50 billion in pretax, pre-provision earnings for the year. But following the call, analysts from CreditSights issued a report stating that "headline EPS beat the Street consensus, but on a core basis it missed."

Chris Armbruster, senior research analyst at Al Frank Asset Management, said he was impressed by the "speed and effectiveness" with which BofA has been able to integrate Merrill Lynch. BofA booked $1.2 billion in cost savings over the past six months due to the Merrill acquisition, "well ahead" of its goal, Lewis said. And despite a $3.6 billion negative value adjustment on Merrill Lynch's toxic assets, the addition of Merrill drove much higher investment banking fees, pushing BofA to the top spot in several league rankings.

"Net-net I am more positive on the shares now than I was before the report," says Armbruster, noting that the second troubled acquisition BofA completed over the past year, Countrywide Financial, has helped drive home loan business as well.

Analysts were also eager to gain insight from executives about how long they expect the recession to drag out. Isabel Schauerte, an analyst at financial research and consulting firm Celent, calls BofA's results " the bellwether of where Main Street is headed" more so than any of its peers.

But based on BofA's $13.4 billion provision for loan losses during the quarter, a moderation of default rates is "not in sight," Schauerte adds.

Lewis noted that early-stage delinquencies have climbed markedly, that there are several variable factors affecting future stress, from changes to credit card and bankruptcy laws to economic worries like unemployment. When asked when credit metrics will stop getting worse, the CEO said he expects reserve building to lessen in coming quarters, and that consumer charge-offs may peak by year-end.

Still, Lewis added, "You'd have to be a psychic and be able to predict the economy so I couldn't do that."

If you liked this article you might like

Where's My Toaster? Banks Want Your Business

Where's My Toaster? Banks Want Your Business

24 Stocks Hedge Funds Are Loving Right Now

24 Stocks Hedge Funds Are Loving Right Now

It's Dumb to Think Amazon Will Be Able to Skirt Regulators Forever

It's Dumb to Think Amazon Will Be Able to Skirt Regulators Forever

Citigroup Gives CEO Corbat 48% Pay Raise as Profitability Misses Goal

Citigroup Gives CEO Corbat 48% Pay Raise as Profitability Misses Goal

Worst-In-Class Goldman Sachs CEO Blankfein Gets 9% Pay Raise

Worst-In-Class Goldman Sachs CEO Blankfein Gets 9% Pay Raise