A few weeks ago, Uber threw in the towel in the China, agreeing to be bought out by Didi Chuxing, the home-grown ride-hail company that dominates the country. Now we have a better idea of what may have prompted the move: Uber reportedly posted a jaw-dropping loss of more than $1.2 billion in the first six months of this year.

Uber’s chief financial officer disclosed the losses in a conference call with investors last week, according to reports by Bloomberg and The New York Times.

Uber was $750 million in the red in the second quarter of 2016, building on a $520 deficit in the first quarter, according to the reports.

While heavy losses are par for the course for early-stage start-ups seeking to edge out competitors, Uber’s losses are striking in their scale. As one analyst told Bloomberg: “You won’t find too many technology companies that could lose this much money, this quickly.”

Uber, of course, is not a publicly traded company — yet — and so it doesn’t have to disclose what’s driving the losses. But it’s safe to say a major drag on revenues are Uber’s heady plans for global domination. In the short six years since Uber launched in San Francisco, the company has sought to expand to nearly every continent, racking up big legal bills along the way as it contends with regulators, resistance from taxi drivers and other hurdles. The biggest draw on revenues, according to the latest reports, have been the incentives Uber has paid to drivers in an attempt to woo them away from competitors.

No where had these costs been higher than in China. Uber’s two-year effort to establish itself in the most populous country in the world had reportedly cost the company more than $2 billion.

This is the silver lining to Uber’s latest losses; the deal with Didi — in which Uber’s China operation is to be absorbed in exchange for a 20 percent share in the reorganized company — will stanch the bleeding.

And, it bears noting, Uber remains the most well-capitalized startup ever, with a valuation approaching $70 billion. And according to the Times, the company saw significant revenue growth in the second quarter of 2016.

With the battle with Didi behind it, Uber may be able to redouble its efforts to vanquish Lyft, its main U.S. competitor. That battle has shown signs of intensifying in recent weeks, with Lyft accusing Uber of being behind rumors that it was rebuffed by prospective buyers.

It’s not clear how much Uber’s substantial investment in the development self-driving vehicles factored into its latest losses.