(Bloomberg) -- Huawei Technologies Co. grew sales for a third straight quarter, after new businesses like cloud services and a resurgent smartphone unit helped mitigate the fallout from US sanctions.

Revenue rose 4.8% to 178.8 billion yuan ($24.7 billion) in the three months ended June, according to calculations by Bloomberg News based on the company’s first-half numbers. Net income almost tripled, at 26.8 billion yuan, after recording gains from earlier business sales.

The company credits improvements in operational efficiency, sales strategy and product mix for its return to growth. It recorded partial gains from the sale of certain businesses, Huawei said in a statement on Friday. The electronics behemoth sold mobile maker Honor Device Co. to a consortium in 2020 and parts of its server business in 2021, both of which are being paid out in installments.

“Our digital power and cloud businesses both experienced strong growth, and our new components for intelligent connected vehicles continue to gain competitiveness,” Chief Financial Officer and Rotating Chair Meng Wanzhou said in the statement.

Huawei’s marquee telecom equipment business was “solid” in the period, according to Meng, and delivered more than half of Huawei’s sales over the first six months of the year. The company grew first-half revenue for the first time in three years.

Huawei and Apple Inc. were the only two major brands to record growth in China smartphone shipments in the second quarter, according to IDC data that showed the Shenzhen-based firm grew by 76%. The company is trying to revive its high-end device business, which has been bludgeoned by US sanctions, but could feature 5G capabilities without using American chips.

It has been expanding its clientele to encompass China’s state-owned ports and coal mines, helping to digitize industries such as power generation. Its division providing cloud infrastructure and services has been gaining ground on Alibaba Group Holding Ltd. and Tencent Holdings Ltd. and making good progress overseas, according to Canalys. The boost from artificial intelligence demand is likely to sustain that momentum even while China’s broader economy struggles to revive growth.

Read more: China’s Economy Is Weakening. Here’s Why That Matters: QuickTake

Huawei has for years labored under a series of US trade restrictions that cut the overseas supply of a slew of key components and software. Qualcomm Inc.’s 5G chips and Alphabet Inc.’s Android operating system are among the most prominent products now considered beyond the Chinese company’s reach. Huawei’s smartphone business, once the world’s biggest in terms of shipments, has since fallen out of the top global rankings.

“This year, the launches of Huawei’s flagship products will return to normal,” the company said in its statement. Its consumer business showed 2.2% growth over the first half of this year, part of an overall 3.1% revenue growth in the six months.

Huawei has refocused on the domestic market and emerging businesses for profit. It clinched major contracts from state-owned telecom carriers and energy companies to build 5G infrastructure around the country. Huawei also teamed with automakers to embed its in-house Harmony operating system in electric cars.

The company has invested $3 billion in its intelligent automotive solutions business and now has 7,000 staff dedicated to further research and development.

In the short term, a volatile Chinese economy could depress its ambitions — Huawei derived more than 60% of sales on ts home turf last year. That’s already reflected in China’s smartphone market as weak demand is projected to persist throughout this year. The peak period for wireless network building is also coming to an end, after the country put in use close to 3 million 5G base stations. Huawei has faced difficulties exporting its signature base stations to some of the most lucrative markets because of a US-led campaign to exclude Chinese products from telecom networks.

©2023 Bloomberg L.P.