Taiwan Semiconductor Manufacturing Co’s quarterly profit exceeded analyst estimates by the widest margin in six years, underscoring how its technological lead is helping the chip maker weather the pandemic as well as US curbs on its No. 2 customer Huawei Technologies.

Apple’s main iPhone chip maker reported net income of NT$120.8 billion (US$4.1 billion) on Thursday, beating the NT$110.6 billion analysts expected on average. That is the biggest profit beat since the three months ended March 2014. TSMC also reported a gross margin of 53 per cent, exceeding its previous guidance of 50 per cent to 52 per cent, according to Thursday’s release.

TSMC, a critically important link in the global supply chain, had previously lowered its 2020 revenue outlook to reflect potentially the biggest economic crisis since the Great Depression. But it said at the time it still expects robust demand for semiconductors in data centres hosting a surge in online activity during the pandemic. The company has maintained its goal of US$15 billion to US$16 billion of capital spending in 2020, up from the previous year’s US$14.9 billion.

Shares of the chip maker fell 1.5 per cent at the close of trading in Taipei, after having surged to a record earlier this week. They are still up about 44 per cent from the March lows amid signs of recovery in demand for the company’s chips.

Its revenue of roughly NT$311 billion, which emerged on Friday when it reported its most recent sales, was already known to have surpassed consensus.

In the longer term, Taiwan’s most valuable company will still have to contend with uncertainty as the coronavirus continues to spread across the globe, particularly as signs emerge of a second wave. TSMC, however, is considered somewhat more resistant to a downturn thanks to its commanding position in the production of high-end chips needed for everything from data centres and gaming to video streaming.

It is also the primary producer of cutting-edge chips for Huawei, though the Trump administration’s ban on the use of American chipmaking gear for the Chinese company threatens a business relationship that accounts for about 14 per cent of TSMC revenue. Chairman Mark Liu told shareholders in June that the Taiwanese chip maker is confident that other customers can replace any business lost because of tightening US curbs on China’s largest tech company.

The June and 2Q20 sales number also supports our view that near-term momentum will remain healthy, which likely will persist into 3Q20 as well,” Sanford C. Bernstein analysts wrote in a note dated July 10. “Despite the ban on Huawei, we believe the long-term growth drivers such as 5G & share gain in high-performance compute (HPC) applications remain unchanged.”