Surging demand for the iPhone in China helped Apple smash sales expectations and post a record breaking profit of $18 billion in just three months.

Apple’s staggering profit is the biggest ever recorded in a quarter by a public company, according to Standard and Poor’s.

The performance was driven by a 70% leap in sales to China compared to a year earlier and a 33% rise in sales to the wider Asia Pacific region.

It comes despite stiff competition from local smartphone makers such as China’s Xiaomi, which was recently valued at $45 billion.

Apple enjoyed a record quarter for iPhone sales, with 74.4 million handsets shifted compared to analysts’ expectations of 70 million.

But demand for the iPad lagged, with sales falling 18% compared to a year earlier.

Revenue rose to $74.6 billion from $57.6 billion a year earlier.

Apple chief executive Tim Cook said: “We’d like to thank our customers for an incredible quarter, which saw demand for Apple products soar to an all-time high.”

News of the result sent Apple shares jumping almost 6% in pre-market trade in New York.