Apple Inc. shares rose in late trading after the tech giant’s quarterly results exceeded expectations on stronger-than-anticipated iPhone sales.

Strong iPhone sales were the key drivers behind Apple’s positive results. The company sold 39.27 million iPhones in the quarter ended Sept. 30, up from 33.79 million units in the previous year. A boost in sales came from the new devices Apple started selling last month — the iPhone 6 and iPhone 6 Plus.

Analysts had predicted Apple would sell 37.8 million iPhones in the quarter.

Apple said net income was $8.47 billion in its fiscal fourth quarter ended Sept. 27 versus $7.51 billion in the year-ago period. Earnings per share rose more sharply, to $1.42 from a split-adjusted $1.18, because the company’s stock-repurchase program reduced the share count.

Revenue rose 12% to $42.12 billion from $37.47 billion in the same period a year earlier.

Apple shares closed Monday at $99.76, up 2.1% for the day. The stock is up about 25% for the year.