In a summer of big tech deals, this could be counted as the most unexpected. Uber is selling its China operations to its bitter – and more successful – rival, Didi Chuxing, which controls 80% of China’s ride-sharing market. The repercussions of the deal will be felt far beyond China, affecting everything from Uber’s prospects for an IPO to the fate of its competitors in other markets. The transaction will involve merging Uber China, mostly owned by Uber but also owned by search giant Baidu and others, with Didi’s operations. It resolves a costly battle for users that led Uber to burn through $2 billion in the past two years. Uber gets an 18% financial stake in Didi plus a $1 billion investment from the company. Both companies will hold a seat on each other’s boards.