Two of China’s most valuable public tech companies announced a deal Thursday evening that will shift one business from NetEase Inc. NTES, +1.00% to Alibaba Group Holding Ltd.BABA, +2.64% and shift a lot of money the other way. Alibaba agreed to acquire an import e-commerce business from NetEase, Kaola, for about $2 billion, and invest $700 million into NetEase’s streaming music business, NetEase Cloud Music. Alibaba will continue to operate Kaola as an independent business, with the general manager of its Tmall business taking over as chief executive of the business. NetEase will retain control of its music business, with the investment from Alibaba being part of a round of financing. With the NetEase segment that most closely rivaled Alibaba’s core business now in the hands of Alibaba, the two companies said the deal “paves the way for the two internet companies with deep roots in Hangzhou to further identify and explore business collaborations.” The deal was announced just following the end of the extended trading period Thursday afternoon; at the end of trading, Alibaba was worth $465.9 billion and NetEase had a market cap of $34.7 billion.