The world's largest technology company said Tuesday that profit fell 22 percent as gross margins slid below 37 percent from more than 42 percent in the year-ago quarter.
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 Electronics Co Ltd, which overtook Apple to become the world's largest smartphone maker in 2012, fueled those fears when it issued a disappointing earnings forecast earlier this month.
Apple's stock, which has fallen 20 percent since January, rose 5 percent 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 percent in the United States from a year earlier, and 66 percent in Japan.
But revenue from greater China - an increasingly crucial market for the Silicon Valley giant as it strives for growth - dived 43 percent from the second quarter and 14 percent 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.
Wall Street's average forecast was for revenue of $35.02 billion and earnings per share of $7.32, according to Thomson Reuters I/B/E/S.
The company has $146.6 billion in cash and short term securities.
HINTS ON NEW DEVICES
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.
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," CFO 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 percent. Gross margins came in at 36.9 percent in the third quarter, sharply below 42.8 percent 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."