Alibaba (BABA) is taking a controlling stake in one of China's leading supermarket chains as it tries to fend off rivals JD.com (JD) and Walmart (WMT) in the fast-growing online grocery industry.

Alibaba planned to spend $3.6 billion to increase its stake in Sun Art Retail Group (SURRY) from 36% to 72% and then make a general offer to shareholders to buy out the rest of the company.

Alibaba is in a fierce battle with JD.com for China's online food market. In June, JD reported online grocery sales doubled over last year's haul.

The e-commerce giants are both using a mixture of physical supermarkets and online platforms to win shoppers. Most notably JD partnered with Walmart and local grocery chain Yonghui, which helped create an extensive network across the country of stores that double as warehouses and fulfillment centers. Alibaba has a similar operation, using its Freshippo grocery store chain and Sun Art shops to store and deliver online groceries.

Upping its stake in Sun Art signals that Alibaba is looking to compete with its rivals post-pandemic. Sun Art operates nearly 500 hypermarkets and supermarkets across China.China's online grocery sector is "set for explosive growth," according to analytics company GlobalData.

As China emerged from lockdown restrictions earlier this year, 56% of shoppers were buying food and groceries online more frequently than before, GlobalData said in a June report. In the United States, about 30% of shoppers were buying food and groceries online more often than before, GlobalData reported.

The news pushed Sun Art shares to $12.63, up $2.54 ir 24.17% or $2.54, and Alibaba shares to $308.22, up 91 cents or 0.3% at 11:19 a.m. EDT