SHANGHAI (Reuters) - China's Alibaba Group Holding Ltd BABA.N reported better-than-expected quarterly revenue and profit on Thursday, aided by growth in its e-commerce and cloud computing businesses.

The beats show the company is managing to outperform expectations even as it weathers an increasingly competitive e-commerce industry and a tougher macroeconomic environment.

Alibaba’s revenue rose 42% to 114.92 billion yuan ($16.3 billion) in its first quarter ended June 30 from 80.92 billion yuan, a year earlier.

Analysts had expected revenue of 111.73 billion yuan, according to IBES data from Refinitiv.

U.S.-listed shares in the company, which makes money primarily by selling advertising and promotional services to third-party merchants on its Taobao and Tmall sites, rose 3% to $166.72 in trading before the bell.

Two of the world’s biggest e-commerce sites, Taobao and Tmall initially grew popular as internet adoption and mobile phone penetration soared in China.

Both Alibaba and smaller rival JD.com JD.O however are seeking to diversify amid slowing e-commerce revenue growth at home, due in part to markets in China's biggest cities becoming saturated.

JD also reported better-than-expected second-quarter revenue on Tuesday, boosted by stronger sales in its online retail business.

In response to a saturated user-base in wealthier parts of the country and growing competition from startup Pinduoduo PDD.O, Alibaba is now targeting consumers in smaller cities.

FILE PHOTO: A logo of Alibaba Group is seen at an exhibition during the World Intelligence Congress in Tianjin, China May 16, 2019. REUTERS/Jason Lee/File Photo

It has also tied up with Starbucks to deliver coffee.

Alibaba has been diversifying into cloud computing and digital entertainment as growth at its massive core e-commerce business slows, and has made major management changes.

Chief Executive Daniel Zhang is expected to formally take over founder Jack Ma’s position as chairman in September, while the Chinese behemoth has put Chief Financial Officer Maggie Wu in charge of its strategic investments unit.

It has also expanded its brick-and-mortar Hema stores, to 150 by the end of the June quarter. In June, Alibaba said the stores would operate as a standalone business unit.

Revenues at its cloud computing business rose 66% to 7.79 billion yuan, while those at its core commerce business rose 44% to 99.54 billion yuan.

Net income attributable to ordinary shareholders was 21.25 billion yuan.

Excluding items, the company earned 12.55 yuan per American Depository Share. Analysts were expecting 10.25 yuan per ADS, according to IBES data from Refinitiv.

Alibaba is planning a secondary listing in Hong Kong according to sources, to replenish a war chest that has been diminished by investments to subdue threats from rivals such as food delivery firm Meituan.

Reuters reported in June that the company had confidentially filed for an IPO in the city that could raise up to $20 billion.

Alibaba has not yet commented on reports of such plans, but investors are watching keenly as increasingly violent demonstrations in Hong Kong take a toll on the city’s image as Asia’s biggest financial hub.

The Hang Seng Index has dropped roughly 12% since late July, when protestors staged a sit-in at the Hong Kong International Airport.