US-based Wal-Mart Stores will divest its Chinese online grocery unit to JD.com, the second-largest online retailer in China after Alibaba.

This transaction will see Wal-Mart receiving a 5% stake in JD.com, worth $1.5bn, as well as securing access to JD.com’s delivery network and 150 million users.

It is expected to boost the US firm’s reach in tapping the growing middle-class consumer segment in the world’s second largest economy.

"It is expected to boost the US firm’s reach in tapping the growing middle-class consumer segment in the world’s second largest economy."

In China, Wal-Mart operates more than 400 offline stores.

Wal-Mart paid $760m for acquiring a 49% stake it did not own in Yihaodian online grocery platform last July. Since this acquisition, the supermarket chain has been struggling with tepid sales and closing underperforming stores.

The latest deal with JD.com will intensify competition in the online grocery business, which is expected to reach almost $180bn by 2020 from the current $40bn.

According to the transaction terms, JD.com will issue around 145 million new class-A shares to Wal-Mart.

Although JD.com will acquire ownership of the online grocery platform, it will be operated by Wal-Mart.

Morgan Stanley & Co LLC served as financial adviser and Morrison & Foerster as legal adviser to Wal-Mart.

Orrick Herrington Sutcliffe and Han Kun Law Offices served as legal advisers to JD.com.