San Francisco/Bengaluru — Apple sales led by the pricey iPhone X pushed quarterly results far beyond Wall Street targets on Tuesday, with subscriptions from App Store, Apple Music and iCloud services bolstering business.

The world’s most valuable technology company also forecast revenue above expectations for the autumn, when it typically launches new iPhone models.

The results were reassuring for a nervous tech sector after sell-offs last week in Facebook, Twitter and Netflix on concern about their future growth.

Apple has responded to a flattening global smartphone market by launching ever-more expensive phones and diversifying into services, prospering even as rival Samsung Electronics missed targets for its flagship Galaxy S9 and China’s Huawei Technologies took the number two global smartphone sales spot.

Apple also regained growth in China, where sales rose 19%. Sales there fell dramatically in 2016 after Chinese consumers shunned the iPhone 7, whose overall appearance differed little from its predecessor.

A $20bn stock buyback in the quarter, spurred by sweeping US corporate tax cuts, brought Apple’s buyback tally this year to a record $43bn and exceeded the stock market value of almost three-quarters of the companies in the SP 500.

"The lesson Apple’s management has learned from the iPhone X, is when you sell a smartphone for more than $1,000, you can sell fewer units and still reap the financial benefits," DA Davidson analyst Thomas Forte said.

Apple shares rose 3.7% in extended trade to $197.34, a record high, putting its market capitalisation at $954bn.

The stock would need to hit $206.49 for Apple to become the first publicly traded US company to cross the $1-trillion threshold, based on Apple’s share count at the end of the quarter. Apple may have reduced its share count since then.

Apple sold 41.3-million iPhones in the fiscal third quarter, half a million less than expected, but the average iPhone selling price topped expectation by $30, hitting $724, according to FactSet.

Apple chief financial officer Luca Maestri told Reuters that customers were buying costlier models and the $999 iPhone X was the quarter’s best seller.

Apple posted third-quarter revenue of $53.3bn and profits of $2.34 per share, compared with analyst estimates of $52.3bn and $2.18 per share, respectively, according to Thomson Reuters IBES.

It also forecast revenue of $60bn-$62bn for its financial fourth quarter, which will include early sales of soon-to-be-announced phone models, beating the $59.6bn analysts expected, according to data from Thomson Reuters IBES.

Despite the beat, James Cordwell, an analyst from Atlantic Equities, said the high selling prices might cause investors some concern because "there’s a limit to how much Apple can grow the iPhone franchise by pushing pricing".

Apple services include streaming music and video, where Apple faces competition from rivals including Spotify Technology and Netflix.

But several of Apple’s services do not face strong rivals.

Maestri told Reuters that sales from Apple Care, the company’s warranty offering, were up 27% from a year ago.

Apple’s biggest selling products do not yet face duties stemming from the US-China trade disputes, but President Donald Trump has threatened hundreds of billions of further tariffs on product categories that have not yet been enumerated.

Apple is looking at whether it will be hit by tariffs on purchases the company must make, possibly related to data centres, CEO Tim Cook said on a conference call with investors.

He credited "wearables", a category which includes wireless earphones and the Apple Watch, with making growing contributions, and the Watch could be hit by tariffs.

Maestri told Reuters that Apple could not keep up with demand for AirPods headphones.

Services revenue was $9.5bn, beating analyst expectations of $9.1bn, according to Thomson Reuters IBES. The revenue included $236m from resolving lawsuits such as Apple’s long-running dispute with Samsung Electronics.

Apple executives emphasised the recurring nature of much of that revenue, saying the company had reached 300-million subscriptions on its devices, a figure that includes both Apple’s own services such as music and third-party subscriptions such as Netflix, where Apple takes a cut of the revenue when it handles the billing.

Cook said Apple Music had more than 50-million users when free trials were counted and hinted at the company’s video content efforts.

Apple has hired prominent television executives from Sony and started making deals for content such as a dramatic series with Hollywood stars Reese Witherspoon and Jennifer Aniston.

Apple has yet to say how it will distribute those shows or how much it will charge, but Cook said Apple was "thrilled about our pipeline that have some new services in it".