The trade war and China’s slowing economy threatens to take a huge bite out of Apple’s earnings. In a rare warning to investors, the tech giant cut its revenue outlook for the latest quarter on Wednesday.

Apple also cited steeper-than-expected “economic deceleration” in the world’s second-largest economy and the downturn in emerging markets.

But the main reason for weaker sales of major products, such as the iPhone, was blamed on trade frictions between Washington and Beijing.

News of Apple’s concerns saw shares slide about 7.6% in after-hours trading.

“While we anticipated some challenges in key emerging markets, we did not foresee the magnitude of the economic deceleration, particularly in Greater China,” Tim Cook, the chief executive at Apple, said in a letter to investors.

“We believe the economic environment in China has been further impacted by rising trade tensions with the United States.”

The blue-chip company slashed its revenue guidance for the first fiscal quarter of 2019, which ended on December 29, to US$84 billion.

This was sharply lower than analyst forecasts of around $91 billion.

“We believe the economic environment in China has been further impacted by rising trade tensions with the United States,” Cook added.

Apple has become the target of nationalist sentiment over the arrest of Huawei’s chief financial officer in Canada at the behest of the US for alleged Iran sanctions violations.

Meng Wanzhou, who is also the daughter of the company’s founder, Ren Zhengfei, was detained in Vancouver on December 1 on a US extradition request linked to sanctions-breaking business dealings with Iran.

The Chinese government has condemned the arrest and demanded her release. The fallout has also left some Chinese shoppers boycotting major US companies such as Apple.

– with reporting from AFP