Media playback is unsupported on your device Media caption Why Apple is worth $1 trillion... and who could challenge it

Apple shares hit a record on Wednesday, pushing the market value of the tech giant closer to the $1 trillion mark.

The shares rose more than 5% to end at more than $201, close to the roughly $207 price needed to make it a $1tn company.

The rise came after Apple reported strong demand for its most expensive iPhones, boosting quarterly revenue despite just 1% growth in shipments.

The average iPhone price hit $724 (£552), well above the expected $694.

The firm said its $999 iPhone X - launched last year - remained its most popular iPhone model in the quarter and had driven the higher sales price.

Revenue growth of 31% in Apple's services business, which includes the App store, Apple Music and Apple Pay, also boosted the firm's performance.

Overall the tech giant's revenue jumped 17% year-on-year to a quarterly record of $53.3bn (£40.6bn), with every region except Japan reporting double digit growth.

Profits rose to $11.5bn, up 32% compared to the same period in 2017.

"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," said analyst Thomas Forte from DA Davidson & Co.

If Apple's momentum continues, it could be the first US company to hit a $1tr market value.

Globally, PetroChina reached that milestone in 2007, though the market cap, which is generally calculated by multiplying the number of shares in a company by its current share price, was measured using the price of its Shanghai-listed shares, not those traded elsewhere, and has since fallen.

Apple already claims a market capitalisation of about $975bn, making it the world's most valuable company, ahead of Amazon, Google-parent Alphabet and Microsoft.

To reach the $1tn threshold, Apple will need to see further increases to its share price - though exactly how high the price has to climb depends on how many shares Apple has.

That is changing as the firm is engaged in a generous share buyback programme, which it expanded by $100bn in May.

Tariff tensions

The company is also vulnerable to trade tensions between the US and China, which have led to new tariffs and rattled global stock markets.

The US is mulling additional duties on $200bn in Chinese imports, which could affect Apple's operations. In recent days, state media in China have also had reports that fault Apple for not doing enough to counter spam in its messaging service.

Apple chief executive Tim Cook told financial analysts on Tuesday that the firm is assessing the risk from the latest US tariff proposal but has not felt direct effects from the higher duties already put in place.

"Our view on tariffs is that they show up as a tax on the consumer and wind up resulting in lower economic growth and sometimes can bring about significant risk of unintended consequences," he said.

However, he said he was optimistic that "this will get sorted out".

Global ranking

Apple sold 41.3m iPhones in the April through June period, up 1% from last year.

The appetite for the firm's most expensive phones marked a contrast with the world's largest smartphone seller Samsung, which disappointed investors by warning of lower than expected sales of its high-end Galaxy S9 .

But Chinese tech company Huawei, which reported 15% revenue growth in the first half of this year, overtook Apple to become the world's second-biggest smartphone seller in the quarter, according to market research firms Canalys and IDC.

That left Apple in third place after Samsung and Huawei.