China’s Didi Chuxing and Uber have now both confirmed that Didi has agreed to buy Uber’s separate business in China — Uber China — as a path to trying to get the two unprofitable on-demand transportation businesses into the black. The deal had been heavily speculated earlier today.

The two companies will retain distinct brands, app and business operations, and it sounds like the backends will be merged. Didi said it will “integrate the managerial and technological experience and expertise of the two teams.”

Didi’s explanation of the financials notes that Uber will be given a 5.89 percent stake in the newly merged entity, with preferential equity that is equal to a 17.7 percent economic interest in Didi Chuxing. Existing Uber China investors, which include China’s dominant search firm Baidu, will get 2.3 percent of the new business.

Meanwhile, Uber’s CEO Travis Kalanick may have come as close as he ever has to admitting Uber may not be able to win on its own in every market where it chooses to operate:

“Uber and Didi Chuxing are investing billions of dollars in China, and both companies have yet to turn a profit there,” he notes in a blog post that we have obtained and which is going up soon. “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.” (We have included the full blog post below.)

The official announcement from Didi does not specify how much actual money is changing hands in this deal. Didi, which claims 15 million drivers and 300 million users in China, simply said it will “obtain a minority equity interest in Uber.”

However, when Bloomberg first broke news of the deal, it reported that it will include Didi making a $1 billion investment in Uber’s global business. As a point of reference, Uber China was lagging Didi in all the metrics that are considered key to ‘winning’ in this sector: Didi had raised more money, it was valued higher, and it alleged that it had a bigger footprint.

On that latter point, both liked to argue this point, and they seem to have reached a PR detente on the back of today’s news: Kalanick in a separate Facebook post doesn’t provide a number to compare his service to Didi’s directly, noting 40 million trips per week, as well as 150 million trips monthly in the Uber blog.

Most recently, Uber China was valued at around $7 billion, while Didi was valued at $28 billion.

This deal was at least one month in the making, possibly longer: we’d heard murmurs of it going down in early July, but were unable to confirm them at the time.

There’s also some people moving around, too. Cheng Wei, founder and chairman of Didi Chuxing, is joining Uber’s board, and Uber CEO Travis Kalanick is joining Didi’s board in return.

Cheng, after a period of ruthless and expensive competition with Uber, now is settling into being a magnanimous winner:

Didi Chuxing and Uber have learned a great deal from each other over the past two years in China’s burgeoning new economy. As a technology leader deeply rooted in China, Didi Chuxing is constantly pushing the frontier of innovation to redefine the future of human mobility,” he noted in a statement today. “This agreement with Uber will set the mobile transportation industry on a healthier, more sustainable path of growth at a higher level. Didi Chuxing commits all our energy to work with regulators, users and partners to meet the transportation, environmental and employment challenges of our cities.

Didi President Jean Liu also noted that this does not take away from Didi’s wider global ambitions:

Over 15 million drivers and 300 million registered users have joined Didi’s open, sharing-based ecosystem that connects people, cars and lifestyles. 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. Didi Chuxing will also continue to expand its international strategy. We look forward to working with our partners at home and abroad to create more value for drivers, passengers and communities.

Future tense

The announcement throws up a lot of questions about the direct consequences of this deal, and also what it might imply for the future of Uber.

For starters, you have to wonder how this will impact the wider competitive landscape in other markets outside of China, if Uber’s CEO is now on the board of Didi and Didi’s CEO is now on Uber’s board. Didi is an investor in all of Uber’s key regional competitors: Lyft (U.S.), Ola (India) and Grab (Southeast Asia). All that we know for now is that the Chinese company said it will “continue to work with global partners” following this deal with Uber.

There is also the issue of who may now a part investor in Uber as a result of this deal: Didi’s investors include Alibaba, Apple, DST, Softbank and Tencent.

There is also a question here about the business model of building these kinds of businesses. Uber, which has raised tens of billions of dollars to build out its operations across global markets, had been developing Uber China as a separate entity, with its own funding structure, but it seems that even with billions, it was not enough to compete against Didi.

For its part, the homegrown rival has most recently said that it was profitable in some 200 of its markets, but not all 360. This implies that even with scale, it’s a waiting game to see how the economics ultimately balance out in favor of profit. Interestingly, by eating up your chief rivals, you can then afford to invest less in competing, with all the discounts and marketing that comes with that.

And, while time may be the best judge of this, this also raises the question of what this could mean for how Uber positions itself in any market where it is struggling and deciding that it may be investing too much to try to win.

The company has been going all-in on new categories like food delivery, and the company has more generally been exercising its ambitions to be a one-stop shop for all kinds of transporting, whether the parcel is an object or a person.

But while Uber has proven to be a formidable rival, might Uber be changing strategy, and choosing now to merge in other markets where it has decided it’s not worth the investment to try to crush the competition? The very concept throws something of a lifeline to competitors who may have thought it might be impossible to fight a war of escalating investment in the past. One transportation rival, Grab, has already come out with a statement that rivalling Uber might not be a losing battle after all.

Blog post from Uber CEO Travis Kalanick that is going up later:

Today we’re announcing our intention to merge Uber China with Didi Chuxing.

Three years ago I traveled to China with a small group of people to see if we might be able to launch Uber there. It was an ambitious idea, given that we were still a relatively small start-up and no one there had ever heard of the company. Most of the people we asked for advice thought we were naive, crazy—or both. I came away with a different view. First, that China is an amazing country and if you aspire to make “transportation as reliable as running water, everywhere for everyone” you can’t ignore a fifth of the world’s population. And second, as an entrepreneur, if you have the opportunity to build both Amazon and Alibaba at the same time, you’d be crazy not to try. Fast forward to today and Uber China—in just two years—has exceeded even my wildest dreams. We’ve grown super fast and are now doing more than 150 million trips a month. This is no small feat given that most U.S technology companies struggle to crack the code there. That’s why I’m so proud of what our amazing China team has accomplished. However, 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. 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.

More to follow