(Includes updated stock prices.)

Capital One ( COF) reported a narrower second-quarter loss than Wall Street had expected on Friday, and said it would have been profitable if not for repaying bailout funds.

The McLean, Va.-based lender lost $275.5 million, or 65 cents per share, last quarter, compared with a profit of $452.9 million, or $1.21 per share, a year ago.

The bank would have earned $224.2 million, or 53 cents per share if not for payments of nearly $500 million to redeem the Treasury Department's investment and dividends on its preferred stock.

Analysts had expected Capital One to post a loss of 73 cents per share, on average, according to Thomson Reuters.

Capital One shares were up 0.2% to $26.53 in recent after-hours trading, after rising 5.1% during the day to close Thursday's session at $27.83. American Express ( AXP), which beat estimates by a penny late Thursday, saw shares up 0.7% to $28.97.

As expected, the bank's loan portfolio showed signs of economic stress, with non-performing loans climbing to $1.1 billion, or 2.51% of total loans, from $848.5 million, or 1.91% in the prior quarter. Capital One charged off $1.12 billion worth of bad loans, representing 1.10% of its loan portfolio, up from 0.76% the prior quarter.

As expected, problems in Capital One's commercial loan book were especially bad, with its NPA rate climbing to 2.24% from 1.98%, and charge-offs up to 0.95% from 0.62%. Commercial loans have become an escalating problem for all lenders, but are a particularly concern for regional lenders like Capital One, KeyCorp ( KEY), SunTrust ( STI), US Bancorp ( USB), Regions Financial ( RF) or M&T Bank ( MTB).

Bigger competitors like Bank of America ( BAC), JPMorgan Chase ( JPM), Citigroup ( C) and Wells Fargo ( WFC) faced similar issues, but a more diversified asset mix helped offset such losses with improvements elsewhere.

"Second quarter results reflect the economic environment and our actions to decisively manage the company through the downturn for the benefit of our shareholders," Chairman and CEO Richard Fairbank said in a statement. "Despite turbulence in the marketplace, we believe that we remain well positioned to weather the storm."