Apple’s Mac business, now 30 years old, just had its best three months in history. Apple shipped 5.5 million Macs last quarter, up almost 1 million units—a 20% increase—from the year before.

The Mac’s big performance comes as a bit of a surprise. The broader PC industry has been shrinking—or flat at best—for a couple of years. And Apple’s Mac sales had been declining with it. After shipping a record 5.2 million Macs in the quarter ended December 2011, Apple didn’t pass 5 million in a quarter again until now. Some, myself included, thought we had reached “Peak Mac”—that Mac sales had topped out for good, and that the iPad would lead Apple’s future “computer” growth. Analysts were forecasting a flat quarter for shipments versus the previous year’s pace.

Then the Mac beat Wall Street’s sales expectations by almost 1 million units.

How did it happen? On Apple’s earnings call yesterday, CFO Luca Maestri noted strong back-to-school sales, and growth—46% year-over-year—in emerging markets. “We now gained market share for 33 of the last 34 quarters,” he said. Later, CEO Tim Cook noted that Mac sales were up 54% in China. “It was just an absolutely blow-away quarter,” he said. “It will result in our highest market share since 1995.”

One unexpected force that might have helped the Mac is the iPad’s dramatic loss of momentum—shipments declined 13% year-over-year to 12.3 million. While Apple watchers used to talk about the iPad cannibalizing the Mac, now it seems to be happening the other way around, too. “I’m sure that some people looked at a Mac and an iPad and decided on a Mac,” Cook said. “And I’m fine with that, by the way.”

Will growth continue? It’s foolish to make long-term forecasts on one breakout quarter. But recent changes are making the Mac better—a good sign.

For example, Apple just started shipping its first desktop computer with a super-high-resolution “retina” display—there’s likely some pent-up demand there. And rumors have circulated about a super-thin notebook in the pipeline that sounds like it could be hugely popular.

Apple’s recent efforts to make Macs work better with iPhones and iPads should help some, too—namely its new “Continuity” and “Handoff” features that make it easier to switch between Macs and iOS devices for messaging, e-mail, web browsing, and even phone calls. Apple’s unique ability to tightly integrate hardware and software—both in individual devices and across its product line—remains one of its biggest strengths versus rivals like HP, Samsung, and Google.

Broader industry trends still favor the Mac: There’s the shift toward the web and away from cumbersome Windows software, Microsoft’s overall decline, greater consumer and corporate familiarity with iPhones and iPads, Apple’s continued efforts to lower its prices, its long lead in design, and its expanding worldwide retail empire.

The big-picture question is what’s going to happen as PCs as tablets continue to converge in utility and design. But for now, the 30-year-old Mac business is enjoying its third wind.