Uber has reportedly agreed to divest its Chinese operations to Didi Chuxing in a $35bn deal that will end intense rivalry between the two companies.

The complete details of the transaction are yet to be officially unveiled. Several media reports, however, claim that the deal will give Uber China, which is owned by US-based Uber, Chinese internet giant Baidu and others, a 20% stake in Didi Chuxing.

Didi will also invest $1bn in Uber at a $68bn valuation as part of the agreement. Uber will continue to operate its own app in the Asian country for now.

Launched in 2014, Uber China has to date failed to make profits. It has been facing stiff competition from Didi Chuxing, which dominates the local market.

Uber CEO Travis Kalanick wrote in a blog post obtained by Bloomberg: “As an entrepreneur, 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."

The latest move from Uber follows pressure from several of its investors over its China operations. The company has been urged to dispose its China assets after a poor financial performance.

China’s ride-hailing leaders Didi and Kuaidi joined forces in 2015. The merged company Didi Chuxing is being backed by the country’s Internet companies Alibaba Group and Tencent Holdings.

Didi Chuxing had raised $7.3bn in fresh capital, which included a $1bn investment from Apple.

The Chinese government has recently passed a new rule to legalise ride-hailing services, which is expected to further increase the potential for expansion of these businesses.