A year ago, General Motors (NYSE:GM) earned a record profit in Q3. In light of this tough comparison, many Wall Street analysts doubted that the General would be able to grow earnings per share last quarter. Once again, the largest U.S. automaker dramatically outperformed the bears' expectations.

GM didn't just grow earnings in Q3, it produced double-digit EPS growth. In fact, adjusted EPS increased 15% year over year last quarter. This was GM's fifth consecutive record quarterly profit. The company now expects to hit the high end of its revised EPS guidance range.

The only thing more surprising than GM's strong earnings growth was Mr. Market's bizarre reaction. General Motors stock slumped more than 4% on Tuesday following the earnings release. This has created another great buying opportunity for long-term investors.

GM Chart

General Motors Stock Performance, data by YCharts.

Strong results across the world

In Q3, General Motors' operating profit was flat or up on a year-over-year basis in all five of its business segments. Most impressively, GM managed to modestly improve its results in Europe, despite the significant negative impact of Brexit on sales and profitability in the U.K.

That said, North America continues to account for essentially all of the General's profit. Last quarter, GM's adjusted operating profit in North America reached $3.5 billion. Meanwhile, the other four segments had a combined operating profit of less than $250 million.

GM is managing through headwinds

A key question for investors is how sustainable GM's current earnings power is, given that auto manufacturing is a cyclical industry. Right now, the auto industry appears to be at the top of the market cycle in the U.S. -- by far, the most important market for General Motors.

The big worry is that, as sales growth grinds to a halt and inventory rises, automakers will start slashing prices to gain market share. Indeed, there has been some evidence that manufacturer incentives are creeping higher.

However, these margin-erosion fears seem to be unwarranted so far. GM achieved a stellar 11.2% operating margin in North America last quarter, down slightly from 11.8% a year earlier, but well above its 10% long-term target margin. The ongoing mix shift from small cars toward trucks, SUVs, and luxury vehicles is cushioning the blow from modest pricing pressure.

Rising dealer inventories haven't hurt GM's earnings yet. Image source: The Motley Fool.

A similar trend is playing out in China. Pricing pressure is on the rise, but demand for more expensive SUVs and luxury cars is improving, as well. These trends are more or less offsetting one another.

General Motors is poised to continue its success in these lucrative market segments. The company is in the early stages of refreshing its mass-market crossover offerings, a process that will continue for the next two years or so. GM's Cadillac luxury brand is also bolstering its lineup with more crossovers.

Patience will pay dividends

GM's profitability has increased dramatically in recent years, as the company has capitalized on strong demand for larger vehicles in the U.S. while restructuring its foreign operations to reduce its losses in weaker markets. Yet investors haven't profited from these improvements. GM shares remain mired below their 2010 IPO price of $33.

It is obviously frustrating for longtime General Motors shareholders that the stock has done so poorly. GM's current valuation implies that many investors are deeply skeptical of GM's ability to maintain its current level of profitability, let alone grow its earnings.

If GM can prove the bears wrong by continuing to deliver strong results even as the auto market stagnates, it should be able to gradually earn a higher valuation. In the meantime, the company continues to buy back shares, giving current investors a higher share of its future profits. It also pays a very generous quarterly dividend of $0.38, providing shareholders (like myself) a nice 4.8% annual yield to wait for the stock price to catch up with reality.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.