Chinese telecommunications giant Huawei Technologies saw its biggest ever revenue fall in the first half of 2021, after US sanctions forced the company to sell a chunk of its handset business and before new growth areas have fully matured.

The company generated revenue of 320.4 billion yuan ($49.56 billion), it said.

This huge fall came from Huawei’s consumer business group, which includes handsets, where revenue fell 47% to 135.7 billion yuan.

It further witnessed a 0.6 percentage point increase in its net profit margin to 9.8%, largely due to efficiency improvements, a company spokesperson said.

In 2019 former US President Donald Trump had blacklisted Huawei and barred it from accessing critical technology of US origin, affecting its ability to design its own chips and source components from outside vendors.

The sanctions hobbled Huawei`s handset business, with Huawei dropping out of the top five vendors in China for the first time in more than seven years in the second quarter, shipping 6.4 million units, according to consultancy Canalys.

Around 27.4 million handsets have been shipped in China in Q2 2020, excluding shipments of Honor budget handsets. Huawei sold the brand in November.

The consumer business brought in over half of the company’s revenue in 2019.

Revenue came down by 14% in the first half from Huawei`s telecoms equipment business, which a spokesperson said was partially down to the slowdown in China`s 5G rollout.

Huawei is trying to focus on software and business areas not at risk of US pressure, according to an internal memo from founder and CEO Ren Zhengfei in May.

“Our aim is to survive, and to do so sustainably,” said Eric Xu, Huawei`s rotating chairman, in a statement on the results. “We`ve set our strategic goals for the next five years.”