File this one under "making hay while the sun shines": General Motors (NYSE: GM) blew away expectations with $2.5 billion of net income in the second quarter. That's $1.54 a share, well ahead of the $1.20 consensus estimate, and a big jump over the $1.33 billion GM posted in the second quarter of 2010. It's also ahead of the $2.4 billion result reported last week by rival Ford (NYSE: F) -- a company that has seemed to be much further along with its turnaround.

Even better, unlike last quarter's eye-popping headline number, this one's free of special, one-time items. That $2.5 billion is real money, making for GM's sixth consecutive profitable quarter, and it's the result of strong performances in GM's businesses throughout the world.

How'd they do it? The old-fashioned way: by stepping up when competitors faltered.

Japan's loss is Detroit's gain
GM's 19% increase in revenues, to $39.4 billion, came during a quarter where the overall level of U.S. auto sales was down significantly. Already well below historical norms early in the year, sales fell to an annualized rate well below 12 million in the wake of the March earthquake and tsunami in Japan.

The disaster decimated key suppliers to companies like Toyota (NYSE: TM) and Honda (NYSE: HMC) and left the two Japanese giants with shortages of popular fuel-efficient models -- just as U.S. consumers, driven by high gas prices and a newfound frugality, were finally starting to turn to smaller cars in larger numbers.

While Ford struggled with short supplies of its acclaimed new Focus compact, whether because the Blue Oval had misjudged demand or because of a supply problem, GM was able to move more than 20,000 copies of the Chevrolet Cruze every month during the quarter (and again in July). The Cruze is the second-best-selling compact so far this year, according to Edmunds -- a big achievement for an all-new nameplate, and a bigger one for a car in a segment where GM's entries have historically been phoned-in afterthoughts.

Strong results across the board
The Cruze's success is one part of the picture, but a bigger one is that selling prices are up across the board and incentives -- finally! -- are down. GM's profit per vehicle is up significantly around the world, and that alone probably contributed $1 billion to the bottom line during the quarter, executives said.

That contribution meant that all of GM's global regions were profitable -- for the first time in years:

  • North America reported pre-tax income of $2.2 billion, a $600 million improvement over year-ago numbers;
  • Europe, GM's longtime problem area, made $102 million before taxes, a solid improvement over the $160 million loss incurred in the year-ago quarter. In addition, the company noted that ongoing restructuring costs were $100 million, down from about $300 million a year ago.
  • South America made $57 million before taxes, down from $195 million a year ago.
  • The International Operations unit, which includes Russia, India, and China, made $573 million, up from $504 million a year ago.

All of this helped further the company's goal of what executives call a "fortress balance sheet." GM ended the quarter with total "automotive liquidity," a term denoting cash and credit outside of its finance arm, of $39.7 billion, including almost $34 billion in cash.

A subdued outlook, but not a worrisome one
Like crosstown rival Ford, GM sought to temper expectations for the remainder of the year. The Detroit automakers are traditionally less profitable in the second half of the year, as costs for new-model-year product launches weigh on earnings somewhat. But this year's results could be further complicated by the ongoing economic uncertainty. Will strapped consumers keep buying cars?

Those newly fattened margins could also get squeezed by a brewing sales war: Toyota executives said earlier this week that they intend to be aggressive with marketing and incentives in the U.S. this fall, seeking to regain lost market share once the company's production capacity is fully restored.

The upshot is that GM's earnings might narrow, but the General's greatly improved cost structure should keep it in the black -- even if the economy gets seriously sour.

A big value play in the making?
The economy and Toyota's impending resurgence may continue to weigh on GM's stock price for a while, but I'm starting to think there's a big opportunity brewing here. Consider this: GM's stock closed at $27.05 Tuesday, a post-IPO low and a level that left the Detroit giant with a market cap of about $40 billion. Again, GM has almost $34 billion in cash, and minimal debt.

Think about that math. While this turnaround still has a ways to go, and the U.S. government still owns more of GM than everyone would like, this is starting to look like a big value opportunity. At some point, the market is going to wake up and realize that the bumbling old General of yesteryear really is turning into a very different kind of company.