Ride-hailing app Uber has agreed to sell its China arm to its rival after losing billions trying to achieve dominance in the country.

The costly battle for customers and drivers appears to be at an end, with a £26bn deal in the pipeline which will see investors in Uber China get a 20% stake in Didi Chuxing - its fiercest competitor.

Uber launched in China in 2014 but has not yet made any profit.

The price war with Didi Chuxing, which has confirmed a deal will take place, was partly to blame.

The battle turned nasty at times, with Uber last year accusing China's main messaging app WeChat of deleting its accounts on the service. WeChat's owner is an investor in Didi.


Image: An Uber driver recruitment office in China

Bloomberg quoted Uber boss Travis Kalanick as saying in a draft blog post: "As an entrepreneur, I've learned that being successful is about listening to your head as well as following your heart.

"I have no doubt that Uber China and Didi Chuxing will be stronger together."

Didi Chuxing is a partnership between homegrown firms Didi and Kuaidi, which joined forces last year.

It carries out more than 14 million journeys each day and says it has an 87% market share.

Image: Didi Chuxing's headquarters in Beijing

Apple made a $1bn investment in Didi earlier this year, in a round of funding that valued the firm at $28bn.

Chinese search engine Baidu is a big investor in Uber, along with Google Ventures - the venture capital arm of the search giant.

Uber's investors have been pressuring bosses to sell off its China assets after $2bn was spent in the country without any return.

By stemming the massive losses in China, it could mean that Uber is a step closer to an initial public offering on the stock market.