Didi Chuxing, the market-leading ride-hailing service in China, has bought out Uber’s operations in the country, reports Bloomberg. The deal gives Uber and its investors a total 20% shareholding in Didi.

The WSJ notes that Didi will also invest $1B in Uber as part of the deal, the same amount Apple invested in Didi back in May …

Didi will buy Uber’s brand, business and data in the country, the Chinese company said in a statement.

Didi and Uber have both been losing money in China as the rival ride-hailing companies competed for market share. Didi had previously bought out fellow Chinese company Kuaidi in an attempt to better compete with Uber, and had already captured more than 87% of the market.

At the time of Apple’s investment in Didi, the company was valued at $28B, while its valuation after this deal is expected to be $35B according to Bloomberg sources, while the WSJ suggests a $36B figure.

Cook said that Apple’s investment was for strategic as well as financial reasons, providing ‘a chance to learn more about certain segments of the China market.’ There has been some speculation that Apple’s car project may be geared more towards ride-hailing services than outright sale to consumers.