iPhone maker Apple has confounded its critics and reported healthy revenues, topping analyst estimates for its fiscal second quarter despite decreasing demand — and sending the company’s share price higher.

The Cupertino company last night reported revenues were $61.1 billion for the last three months, up 16% from the same period a year ago. Profit, meanwhile, came in at $13.82 billion, from $11.03 billion last year.

The better-than-expected results propelled the Apple share price on in New York in after-hours trading, helped by the company’s plans to buy back $100 billion in shares and raise its quarterly dividend 16%, to 73 cents a share from 63 cents previously.

Shares rose a little over 2% after the market close. Apple shares are up 14% in the past 12 months and the company is the world’s most valuable with a market capitalisation of around $858 billion.

Apple share price

Source: Google Finance

Apple said it sold 52.2 million iPhones in the three months up to March — only marginally below expectations.

However, if Apple watchers peel back the layers, things are perhaps not quite as healthy as they might seem — inventories of unsold products are building up in the company’s warehouses, suggesting a global slowdown in smartphone sales could begin to hurt Apple.

Last month, Asian semiconductor maker SK Hynix warned that the slower growth in smartphone sales around the world means it expects its chips sales growth to ease in the coming months.

The South Korean chip maker said a maturing global smartphone market means last year’s boom in chip demand is moderating.

Apple chief executive Tim Cook also chose not to disclose how many of the new iPhone X the company sold — though he did boast it was the most popular mobile in China in the last quarter.

Cook said in a statement:

Customers chose iPhone X more than any other iPhone each week in the March quarter, just as they did following its launch in the December quarter. We also grew revenue in all of our geographic segments, with over 20% growth in Greater China and Japan.

Elsewhere, iPad purchases reached 9.1 million for the quarter while Mac sales reached four million over the last three months, representing around 5% of the total PC market.

Revenues at Apple’s services business that includes Apple Music and the App Store jumped almost a third to $9.1 billion. The company now has 270 million paid subscribers across its applications and services — up around 100 million from a year ago.