Overall Apple reported a 3% rise in the number of phones sold, while revenue from phones jumped 14%, reflecting more expensive models.

Some analysts had questioned whether demand for the most expensive iPhone would hold up after the initial rush.

But Apple said the iPhone X was the best-selling model in every week of the quarter - despite costing almost $1,000 or £1,000.

The average selling prices came in at $728, below analyst expectations of $742, which finance chief Luca Maestri blamed on clearing stocks of older models.

On a call with financial analysts, chief executive Tim Cook dismissed concerns about soft demand for smart phones, pointing to the millions of people who still do not own one.

"We still believe that over time every phone sold will be a smart phone, so it seems to us... that's a pretty big opportunity," he said on a call with investors.

Image copyrightGetty Images

The iPhone continues to account for the bulk of Apple's revenues at just over 62% of the total. Sales of iPads rose 2% to 9.1 million units compared with the same period last year, while Mac sales slipped 3% to 4.07 million.

Apple's services unit added 30 million subscriptions in the past 90 days alone, bringing the total to 270 million.

Mr Stanton said that growth underlined a shift in strategy to develop businesses outside its core products: "This is the future of Apple."

'Very optimistic'

Overall profits in the quarter were $13.8bn, up a quarter from the same period in 2017.

The firm's revenue hit a record for the March quarter, which follows the Christmas rush and is traditionally one of the company's weaker periods.

Sales growth of more than 20% in Japan and the greater China market - a critical area for the company - helped to lift the numbers.

Mr Cook said Apple had the three top-selling phones in China and brushed aside concerns about how a brewing tariff fight between the US and China, where many of its phones are made, could hurt the company.

"I think there's a lot of things that bind the countries together and I'm actually very optimistic," he said.

Apple bought shares worth $23.5bn in the three months to March. It has purchased about $200bn of stock since 2012.

The new plan to buy back even more stock comes after the US changed its tax laws last year, lowering its corporate rate to encourage companies to return cash piles to America.

Apple also said it would increase the quarterly dividend by 16%.

The next generation of software for the iPhone, iPad and other product lines will be shown off at its annual developer conference, WWDC, next month.