GettyImages-53287269
Workers ride tricycles past the first Walmart store in Shanghai as preparations are made for the grand opening July 25, 2005, in Shanghai, China. China Photos/Getty Images

SHANGHAI — Wal-Mart Stores is to sell its Chinese online store, Yihaodian (also known as yhd.com), to China’s second-largest online retailer JD.com, in a reversal of strategy that analysts say reveals the challenges for foreign retailers trying to break into China's e-commerce market.

In return, the U.S. retail giant will take a 5 percent stake in JD.com, in a deal estimated by Bloomberg to be worth around $1.5 billion. The two companies said in a statement that the deal would enable them to link their supply chains, and Walmart’s Sam’s Club will open an online store on JD.com.

However, some observers said the sale was an indication that Walmart's online grocery business in China had not developed as smoothly as the company had hoped. It first bought a stake in Yihaodian ( Chinese for "Number One Store"), one of China’s earliest online grocery retailers, in 2011, and increased this to 51 percent the following year, before completing its buyout of the company last summer. It said at the time that the purchase would set Walmart up "for long-term growth” in China.

But Zhang Yi of Guangzhou-based iMedia Research said that online retailing in China was “not so simple,” and suggested Walmart had “not expected” the high costs of labor, logistics and promotion involved in business-to-consumer online retailing, the official Global Times reported Tuesday.

Analysts say Yihaodian has found it hard to compete with the growing availability of groceries (often sourced directly from producers) on Taobao, China’s biggest online retail market. Taobao is owned by internet giant Alibaba, which is also pouring massive resources into developing rural e-commerce, something seen as beyond the reach of many of its rivals.

Yihaodian reportedly had less than one percent share of China’s business to consumer (B2C) e-commerce in the first quarter of this year, the Global Times said. Even JD.com, which has an estimated 22 percent market stake in China's B2C e-commerce sector, made a net loss of some $1.44 billion last year, it said.

JD.com has set its sights on emphasizing deals with authentic foreign brands. Last year it launched a "U.S. Mall" for major American brands, offering some exclusive products.

Analysts said the deal would help JD compete against rival Alibaba, by expanding its reach into the grocery field. Its CEO Richard Liu said Yihaodian had “tremendous strength in important regions of eastern and southern China," while Walmart CEO Doug McMillon said JD.com was an “ideal partner” with a "very complementary business” that would help the company reach “significantly more customers."

Nevertheless, the deal is being seen as a reflection of the cut-throat competition and rapid pace of change in China’s retail sector, both online and offline. Walmart has established itself as a major player in China’s grocery market with some 400 stores, and a presence in both major and smaller cities.

However, it has recently closed stores in several Chinese cities due to online challenges and what it has called a “challenging macroeconomic environment,” while other major foreign retailers such as France’s Carrefour have done the same.

Some analysts say such foreign giants have been slow to adapt to the pace of changing tastes in China’s markets – with more flexible Chinese competitors opening convenience stores, and leisure facilities, and proving more adept at online sales.

Walmart also announced earlier this year that it was closing 269 stores around the world, mostly in north and south America, in the face of competition from online retailers such as Amazon.com.

Experts said Walmart would now seek to focus on its core offline store business in China.

The company has also faced challenges from Chinese brands using similar names – and has been at the center of a row involving trade union activists protesting against a planned new working hours system in its Chinese stores, according to Hong Kong-based China Labor Bulletin.