Walmart buys stake in Chinese online retailer

Walmart is taking a big stake in a prominent Chinese e-commerce company. But it’s not Alibaba.

The Arkansas-based retail giant said Monday it will buy about 5% of Alibaba rival JD.com — an investment worth about $1.5 billion. JD is the second-largest retailer in China.

Shares of JD(JD) were up more than 8% before they were halted ahead of the official news announcement. (The Wall Street Journal originally reported about the deal earlier Monday morning.) The stock was still up around 6% once it resumed trading.

Walmart’s stock was up a bit too Monday, but it was lagging the broader market’s larger gains. That may be because the news could be viewed as a sign that Walmart is sort of throwing in the towel on China.

As part of the deal, Walmart is also selling its own Chinese e-commerce site — Yihaodian — to JD. Walmart(WMT) said that it will continue to sell goods on Yihaodian and that it will work closely with JD on ways to grow the Yihaodian brand.

Walmart will also set up a flagship store for its Sam’s Club China warehouse unit on JD’s marketplace.

“We’re excited about teaming up with such a strong leader in JD.com, and the potential that this new relationship creates for customers in China, as well as for our businesses,” said Walmart CEO Doug McMillon in a release.

“We also look forward to offering customers a tremendous number of quality imported products not previously widely available in China through Walmart and Sam’s Club,” McMillon added.

JD CEO Richard Liu said his company would further develop Yihaodian. He noted that Sam’s Clubs in China have already been popular in several Chinese cities — particularly with wealthier Chinese consumers.

And Liu appeared to take a jab at rival Alibaba(BABA, Tech30) — which has had a problem with counterfeit goods on its many e-commerce sites.

“JD.com’s reputation for authentic products and superior customer experience make it an outstanding home for these iconic businesses to reach hundreds of millions more customers in China,” he said..

Alibaba investors appeared to take the news in stride. The stock rose 2% on Monday.

And while Alibaba shares are still down 3% so far this year, Alibaba has held up a lot better than JD as investors worry about the health of China’s economy.

JD has lost about a third of its value so far this year.

The company recently reported a bigger-than-expected loss for the first quarter. Analysts are now forecasting that JD will post a loss for all of 2016 too. Only two months ago, Wall Street was predicting a profit.

So it looks like the endorsement from Walmart comes at a much needed time.

But it remains to be seen if the JD-Walmart alliance will be able to make a serious dent into Alibaba’s market share. What’s more, both Alibaba and Walmart continue to face an uphill battle against Amazon(AMZN, Tech30) — which is now the world’s most valuable retailer.