After two years of fierce rivalry between Uber Technologies Inc. and Didi Chuxing, Uber decided to raise the white flag. Uber will sell its remaining Chinese operations to Didi Chuxing to focus on other global markets and potentially file for an IPO.

Last year, to fight against Uber, China’s transportation giants Didi and Kuaidi joined forces. In addition to this new business alliance, Didi and Kuaidi enlisted the help of influential internet businesses such as Alibaba Group Holding Ltd. and Tencent Holdings Ltd. to back up the alliance against Uber. Apple later joined the alliance with an investment of $1 billion in Didi. In addition to the many influential companies flocking to Didi, the Chinese government recently passed legislation that legalized cab-hailing services.

With so many companies backing Didi, Uber admits defeat. In the last two years, Uber lost $2 billion on China’s cab-hailing market. Investors urged Uber to strike a deal with Didi to cut losses. Now that a deal has been struck, Didi will invest $1 billion in Uber’s global business.

Uber’s losses in China have been affecting Uber’s overall business. Although Uber’s operations have been successful in the U.S and Canada, operations in China have been weighing them down. Losses in China are also delaying Uber’s IPO.

With the deal sealed in China, Uber can refocus its efforts on its other global markets. Didi isn’t Uber’s only competition. Uber is competing against similar businesses all around the world such as Ola in India, Grab in Southeast Asia, and Lyft in the U.S.

Didi will be given Uber’s brand, business, and data in the country. Stockholders for Uber China operations will be provided 20% of shares from the merged company.

Didi’s CEO, Cheng Wei, states that the agreement between Didi and Uber will improve the transportation industry and put it back on a path of growth.

Didi’s combined business will be worth $35 billion. Uber, after the agreement, was valued at $68 billion. Uber also benefits by removing a potential threat to its upcoming IPO.