Your flaming wreck is arriving in three minutes.

As of late, Uber has become embroiled in a stunning number of PR disasters, with near-daily revelations of horrible behavior from the CEO and the corporate culture as a whole (even if this wave of bad press was a long time coming). But the true existential threat to the company may be unfolding in a San Francisco courtroom.

In late February, Waymo, the automated-car company Google spun off in early 2016, sued Uber and its self-driving subsidiary, Otto. The charge: patent infringement and theft of trade secrets related to Google’s automated-car program.

Google charged that former Google engineer Anthony Levandowski abruptly left the company in early 2016 to found his own self-driving-trucking start-up, Otto. After only six months of operation, Otto was acquired by Uber in the summer of 2016 for over a half-billion dollars. The amount of money for, and quickness of, the acquisition raised Google’s suspicions, and it began an investigation into the time shortly before Levandowski left. Google claims it discovered that Levandowski accessed Waymo’s servers and snagged 9.7 GB of Waymo data before leaving to found Otto. Then, in December of 2016, a supply-chain manufacturer accidentally emailed a Waymo employee an attachment meant for Uber and Otto. That attachment, says Google, showed that Uber and Otto were copying a vital bit of tech for their self-driving cars. Google filed a lawsuit a few weeks later. (For a clearer breakdown of everything that happened, see Daniel Compton’s remarkably lucid timeline of the events in question.)

Now, there’s even more color added, thanks to a (heavily redacted) written declaration by Google engineer Pierre-Yves Droz, with Droz detailing much of Levandowski’s alleged malfeasance. It should be noted that Droz is no Google lackey being brought to the stand to impugn Levandowski — along with Andrew Schultz, Droz and Levandowski started a company called 510 Systems in 2006, which was later acquired by Google to jump-start their automated-car efforts in 2011.

Droz outlines some of the innovations Waymo developed along the way — many of which are codified into patents, such as Waymo’s key insight into building a single lens for its laser range-finding system, which greatly reduced the cost and complexity of manufacturing the systems. While Droz details Levandowski’s alleged theft of documents from Waymo servers, it doesn’t appear that he has first-hand knowledge of them.

What he does have are recollections of conversations with Levandowski, in which Levandowski seemingly lays out his entire plan. “Mr. Levandowski personally told me in January 2016 he was interested in implementing long-range LiDAR at his new company and was thus interested in the design which is not available in any commercially available LiDAR system that I know of,” states Droz. “I distinctly remember taking a walk around our Mountain View office one-on-one with Mr. Levandowski on or around January 5, 2016. During this walk, he told me specifically that he wanted his new company to have a long-range LiDAR, which is very useful for self-driving truck applications he was interested in. He also told me that he planned to ‘replicate’ this Waymo technology at his new company.”

Droz says the revelation did not come as a surprise. “Mr. Levandowski had previously told me, in or around the summer of 2015, that he had talked with Brian McClendon, an Uber executive involved with their self-driving car project,” states Droz. “We were having dinner at a restaurant near the office, and he told me that it would be nice to create a new self-driving car startup and that Uber would be interested in buying the team responsible for the LiDAR we were developing at Google.”

Droz’s statement concludes with this damning bit of detail. “Later in January 2016, a colleague told me that Mr. Levandowski had been seen at Uber’s headquarters in mid January. I asked Mr. Levandowski about this, and he admitted he had met with Uber, and the reason he was there was that he was looking for investors for his new company.”

There are two main bits to take away from Droz’s written declaration. One, if what Droz declared is true, Levandowski had a clear plan to use the information developed at Waymo for his own start-up. But, and this is where things could get very dicey for Uber, Levandowski may have been talking to Uber as early as 2015 about bringing that information over from Waymo.

This makes it even more likely that Google’s request for a preliminary injunction will move forward, meaning Uber will have to halt all work on its self-driving-automobile program. That alone could be devastating, and likely sink Uber’s ability to IPO this year — even without the constant barrage of bad PR coming out of the company.

But Uber could potentially weather a round of bad PR, bring in an adult COO to run things and rein in the worst of CEO Travis Kalanick’s idiotic impulses, and hold on to its position in the short term as the market leader in ride-hailing apps. But to use a term popularized by Warren Buffett, Uber’s economic moat — its competitive advantage that keeps other would-be Ubers at bay — is its pure size and ability to continuously raise billions of dollars. For most markets, Uber and Lyft are really the only two players in the game, and Uber dwarfs Lyft in size, no matter how many times #DeleteUber may trend on Twitter.

But self-driving cars would fundamentally change that, something Kalanick himself admitted in August of 2016, when his company acquired Otto. In an interview with Business Insider’s Nicholas Carlson, Kalanick said the world was clearly moving toward autonomous cars, and Uber was lagging behind. “So if that’s happening, what would happen if we weren’t a part of that future? If we weren’t part of the autonomy thing? Then the future passes us by, basically, in a very expeditious and efficient way.”

With a looming court case against Google, one of the world’s richest companies, and Uber’s plans for “the autonomy thing” potentially breaking down, Kalanick and Uber may see just such a future come to pass.