(Reuters) - Chinese e-commerce firm Alibaba Group Holding is injecting its online pharmacy operations into a Hong Kong-listed affiliate in a $2.5 billion deal to consolidate its healthcare enterprise and ride a boom in online health-related business.

Shares in the affiliate, Alibaba Health Information Technology Limited, nearly doubled early on Wednesday after the announcement, resuming trading after being suspended since March 20.

Under the deal, Alibaba Health will buy 100 percent of the online pharmacy operations from a wholly owned subsidiary of Alibaba Group and another investor for HK$19.45 billion ($2.5 billion). It will issue shares and bonds to fund the purchase, with the shares priced at HK$5.28 each.

"We expect that this integration will enable Alibaba Group to build a healthcare ecosystem that can utilize e-commerce, big data and other technologies to improve the healthcare supply chain," Alibaba Group chief operating officer Daniel Zhang said in a statement.

Online pharmacies are currently limited to selling over-the-counter medicines and healthcare products such as cough remedies and vitamin tablets, but China is gearing up to open the over 1 trillion yuan ($161 billion) prescription drug market to online pharmacy operators like Alibaba Health, JD.com and Wal-Mart Stores Inc.

Beijing hopes to boost retail drug sales at pharmacy chains and online, and wrestle some sales away from hospitals, which currently control around three-quarters of drug sales.

Alibaba said there were currently 186 online-licensed pharmacies on its Tmall online marketplace. Gross merchandise value (GMV) of those businesses for the financial year ended March 31, 2015 was approximately 4.74 billion yuan, it said. After the consolidation, consumers will still to be able to access online pharmacies through Tmall.

The deal, which is subject to approval by independent shareholders of Alibaba Health, is expected to be completed in the third quarter this year, raising Alibaba Group's effective equity ownership of Alibaba Health to about 53 percent from 38 percent and making it a consolidated subsidiary, it said.

Rivals such as Tencent Holdings, JD.com and Baidu have all made moves to get into China's online healthcare market, seen as a potential cure for a fragmented and opaque market controlled by state-run distributors and hospitals.

"All these online healthcare services will help better integrate asymmetrical and highly fragmented healthcare services in China," said Goldman Sachs healthcare analyst Wei Du in a recent report.