Sales of Apple iPhone trumped Wall Street estimates after US shipments soared 51% in the third quarter, lifting its stock 5% even as profit fell.
The world's largest technology company said that profit fell 22% as gross margins slid below 7% from more than 42% in the same quarter of last year.
The iPhone's solid showing eased concerns that growing competition is hurting demand for Apple's top-selling product as the global smartphone market matures.
Rival Samsung, which overtook Apple to become the world's largest smartphone maker in 2012, fuelled those fears when it issued a disappointing earnings forecast earlier this month.
Apple's stock, which has fallen 20% since January, rose 5% to $437.94 in after-hours trade. It closed at $418.99 on Nasdaq.
"The iPhone number should provide some comfort to investors who were worried about smartphone demand. That’s one of the reasons the stock is up. Expectations were not strong for this quarter," said Shannon Cross of Cross Research.
The company sold 31.2 million iPhones last quarter - far more than the estimated 26 million - and 14.6 million iPads.
Chief Financial Officer Peter Oppenheimer said in an interview that iPhone sales rose 51% in the United States from a year earlier, and 66% in Japan.
But revenue from greater China - an increasingly crucial market for the Silicon Valley giant as it strives for growth - dived 43% from the second quarter and 14% from the year-ago period.
Executives blamed China's slowing economy for the revenue decline but did not elaborate.
"China is a huge opportunity for Apple," Chief Executive Tim Cook said on a conference call. "I don't get discouraged over a 90-day kind of cycle."
Apple earned $6.9 billion, or $7.47 a share, on revenue of $35.3 billion. That compared with a profit of $8.8 billion, or $9.32 a share, on revenue of about $35 billion in the year-ago quarter.
The company has $146.6 billion in cash and short term securities.
Investors' biggest long-term concern about Apple is whether the company has lost its innovative edge after re-imagining at least three major consumer electronics markets, with iTunes and the iPod, the iPhone and then the iPad.
Since launching the iPad mini last fall, the company has yet to update its major devices.
Mr Cook told analysts to expect new products in coming months, with some "in new categories," but as usual he played his cards close to the vest.
"We are on track to have a very busy fall,” Mr Oppenheimer said earlier during the call without going into details.
Apple forecast revenue of $34 billion to $37 billion this quarter, slightly below Wall Street's average projection of $37.04 billion.
It estimated a margin of 36 to 37%. Gross margins came in at 36.9% in the third quarter, sharply below 42.8% a year ago, as Apple sold more cheaper older model iPhones along with the new iPhone 5 model.
"It’s pretty remarkable that they are selling as many phones as they are, given that it’s not a new product," said Michael Yoshikami, chief executive of Destination Wealth, which owns Apple shares.
"That’s really the key for them; they’ve got to come up with a new product."