Chinese ride-hailing service Didi Chuxing is taking over Uber's local business in a deal valuing the combined company at $35 billion. The move was first reported by Bloomberg and Recode, and later confirmed in a Facebook post by Uber CEO Travis Kalanick. Didi is also investing $1 billion in Uber, based on a $68 billion overall valuation. In exchange for its operation in China, Uber will receive 5.89 percent of the newly merged firm's assets, which is equal to a 17.7 percent economic interest in Didi Chuxing.

"As an entrepreneur, I've learned that being successful is about listening to your head as well as following your heart," said Kalanick in the Facebook post, which was circulated before its official publication. "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."

Uber has found it extremely hard to grow in China against Didi's dominance; the Chinese company recently gained worldwide attention after receiving $1 billion in investment from Apple, and later secured more than $7 billion in total. Today's deal could be seen as Uber giving up, but its investors will take a stake in the newly merged alliance with Didi, and Uber as a whole will be able to stem the massive losses it's been suffering in the region. Bloomberg reports the company has lost over $2 billion in China to date.

Update August 1st, 5:28AM ET: The story has been updated to include confirmation of the deal from Uber CEO Travis Kalanick and financial details from Didi Chuxing.