Uber’s seemingly unceasing expansion across the world has finally had the brakes applied as the ride-sharing company plans a deal to sell its Chinese operation to local rival Didi Chuxing, according to Bloomberg News.

The new company will valued at around $35bn (£19bn) – given Didi’s previous $28bn valuation, that values Uber China at $7bn – and puts an end to a year-long standoff that has led to both Uber China and Didi losing money in an effort to secure a lasting victory. Uber alone has lost more than $2bn in the fight.

At times, the battle has got nasty. One year ago Uber accused China’s biggest messaging app, WeChat, of deleting its accounts on the service. WeChat’s owner, Tencent, is a substantial investor in Didi. So too are Alibaba, China’s answer to Amazon, and Apple, which took a $1bn stake in May.

Uber China, meanwhile, counts Baidu among its external investors, as well as Uber Global (the company is structured as an independent corporation). Following the buyout, Uber China investors will own 20% of the new Uber-Didi conglomerate. Symbolising the extent to which former enemies are now partners, Didi is also taking a $1bn stake in Uber Global, at a valuation of almost $70bn.

The detente has a further outcome. With the removal of the biggest question mark hanging over Uber’s future, the company is now free to focus on the next major step in its corporate plan: an initial public offering, likely to arrive some time in 2017.

In a blog post, Uber’s chief executive, Travis Kalanick, wrote: “I’ve learned that being successful is about listening to your head as well as following your heart. Uber and Didi Chuxing are investing billions of dollars in China and both companies have yet to turn a profit there. Getting to profitability is the only way to build a sustainable business that can best serve Chinese riders, drivers and cities over the long term.

“I have no doubt that Uber China and Didi Chuxing will be stronger together. That’s why I’m so excited about our future, both in China – a country which has been incredibly open to innovation in our industry – and the rest of the world, where ridesharing is increasingly becoming a credible alternative to car ownership.”

The deal leaves Uber’s branding intact in the country, according to Didi, and for the time being the company will operate independently from Didi, “to ensure stability and continuity of service for passengers and drivers”. Back-end functions will be merged shortly, however.

Jean Liu, the president of Didi, said: “With the addition of the strong talents and experience of the Uber China team, Didi Chuxing will be even better positioned to serve the Chinese people.”

Liu, the daughter of Lenovo founder Liu Chuanzhi, joined the ride-sharing firm in February 2015, shortly before the company acquired its biggest homegrown rival, Kuaidi. She added: “We look forward to working with our partners at home and abroad to create more value for drivers, passengers and communities.”

The Forrester analyst Xiaofeng Wang argues that the merger will be good for both customers and investors. “Unlike the Didi-Kuaidi merger, where the two platforms offered almost identical services, Uber and Didi have different offerings that have different benefits to consumers. For example, there was a calculation of which car service platform is the best choice, and the calculation shows Uber is better for short-distance ride, and Didi is better for longer ones. They have different loyalty programs as well, and consumers can choose whichever best for them.”

“We believe Didi’s good relationship with the government also contributed in getting the green light to legalise ride-hailing apps in China, which Uber will also benefit from,” Wang added.