Uber and Google are locked in a legal battle that could have huge implications for the future of the self-driving car industry. If Uber loses its lawsuit, it could cost the company millions and set back Uber’s self-driving car effort by months — months Uber probably can’t afford to lose.

The lawsuit started when Waymo, Google’s self-driving car unit, alleged that Uber is using sensors based on stolen Waymo designs and asked the courts to block Uber from using the designs.

Uber fired back in a legal brief on Friday, denying that its sensors were based on Waymo’s technology and accusing Waymo of trying to tie up a legitimate competitor with frivolous litigation.

More from Vox:
A political scientist explains how multiculturalism’s ‘success’ gave us Trump
Homeland season 6 simply can’t compete with reality’s plot twists
Trump wants to cut billions from the NIH. This is what we’ll miss out on if he does.

It’s not uncommon for the invention of an important new technology to be followed by legal battles over rights to that technology. Apple, for example, fought a years-long legal battle with Samsung, Motorola, HTC, and other makers of Android-based phones in the early years of the smartphone industry. Apple won some money from these lawsuits, but strategically speaking, they ended in a draw. Apple’s competitors were able to continue churning out Android-based smartphones, and Android ended up controlling a large majority of the global smartphone market.

In contrast, there’s a real possibility that Waymo could beat Uber decisively in court. “This is an extraordinary case,” said William Alsup, the California federal judge who is overseeing the case, on Wednesday. His take on Google’s evidence: “I’ve never seen a record this strong in 42 years.”

If the court orders Uber not to use technology similar to Waymo’s, it could set back Uber’s self-driving car project by many months. And Uber CEO Travis Kalanick has said his company will be in big trouble if another company beats it to market with self-driving technology.

“If we are not tied for first, then the entity that’s in first then rolls out a ride-sharing network that is far cheaper or far higher-quality than Uber’s, then Uber is no longer a thing,” Kalanick said in a 2016 interview.

Uber hoped that hiring some of Waymo’s top engineers would help it catch up to Waymo. But if Waymo proves that this was really a ploy to copy its technology, the move could backfire spectacularly.

The central figure in the legal drama is Anthony Levandowski, a brilliant engineer and the driving force behind the business deal that ultimately led to Waymo’s lawsuit. Levandowski quit his job at Google (now Waymo) in early 2016 and immediately started a new company called Otto. Just a few months later, in May 2016, the company unveiled a prototype of its self-driving truck technology. In August, Otto was acquired by Uber for around $700 million — a massive payout for a company that had existed for less than a year.

Waymo now claims that the reason Levandowski was able to get the new self-driving truck technology working so quickly is that key elements of the design were stolen from Waymo. According to Waymo, Levandowski downloaded 14,000 confidential documents from the Waymo network in the days before he left his old employer. And Waymo believes he illegally relied on those documents to guide the development of Otto’s own technology.

Levandowski isn’t well-known to the public, but in the industry it has long been obvious that he was a rising star. A 2003 profile of him as a 23-year-old UC Berkeley graduate student reported that he was already working to raise $600,000 for a startup.

In 2004, the military’s Defense Advanced Research Projects Agency, which brought you the internet, announced a competition to build a self-driving car that could make it across the desert. Levandowski organized a team to enter the competition, but for an extra challenge the team built a self-driving motorcycle instead of a car. They didn’t win — in fact, no one’s vehicle completed the course that year — but it was the start of Levandowski’s involvement in the self-driving vehicle industry.

Levandowski went on to found a startup called 510 Systems with some Berkeley colleagues. It started out selling camera technology to Google for collecting Street View images. Levandowski joined Google to work on its mapping technology in 2007, but continued working closely with his 510 Systems colleagues on Google-related projects. Finally, in 2011 Google acquired 510 Systems, and its engineers became early members of Google’s self-driving car project.

This early history may explain Levandowski’s casual attitude about working on side projects at the same time he was on Google’s payroll. Waymo now claims that in 2012, unbeknownst to Google, Levandowski took a stake in another startup called Odin Wave (for reasons that aren’t clear, it’s also went by “Tyto Lidar” in some documents) that was founded by one of his teammates from the DARPA Grand Challenge days. “Lidar” refers to a key sensor technology that allows a self-driving car to form a 3D picture of its surroundings.

Waymo says that in 2013, it heard from a third-party vendor that Odin Wave had submitted an order to build a custom lidar sensor that was suspiciously similar to Google’s own design. When confronted in 2013, Waymo says, Levandowski denied having an ownership interest in the company.

The next year, Google considered buying Odin Wave and asked Levandowski to evaluate the possibility. Waymo now says that Levandowski never disclosed a relationship to the company even as he was advising Google about whether to buy it.

In summer 2015, Waymo alleges in a court filing, Levandowski started talking to Uber — months before he officially left Waymo to found Otto. Pierre-Yves Droz, a 510 Systems co-founder who is now a senior Waymo engineer, stated in the filing that Levandowski spent months trying to recruit engineers on his Waymo team to join his startup, and that he expected from the outset to sell the company to Uber.

Droz wrote that over dinner in the summer of 2015, Levandowski “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.”

Of course, there’s nothing illegal about an experienced engineer leaving one company to work at another one. And especially in California, where the courts don’t enforce noncompete agreements, there’s nothing illegal about an engineer putting the skills and knowledge he’d developed at one job to use for a new employer.

But Google’s new Waymo division believes Levandowski crossed the line by actively recruiting employees for his new venture while he was still on Waymo’s payroll, and by taking confidential documents with him when he left Waymo.

Uber responded to Waymo’s accusations in a Friday court filing. “Both of Waymo’s central premises — that former Waymo employees brought thousands of confidential Waymo documents to Uber to build a copycat lidar and that Uber’s lidar closely mimics Waymo’s single-lens design — are demonstrably false,” the company writes.

Uber says it has strict policies in place to ensure that employees don’t bring confidential information with them when they join Uber from another technology company. And it says those safeguards worked: A search of Uber’s network and the laptops of key employees did not turn up copies of the documents Waymo says were stolen by Levandowski.

However, this argument has a big, important caveat: Uber was unable to search Levandowski’s personal computers because he had gotten his own lawyer and invoked his Fifth Amendment right against self-incrimination.

“Uber finds itself in a complicated situation” due to Levandowski’s lack of cooperation, the ride-hailing company admitted in its legal filing.

Uber also argues that its lidar technology can’t have been copied from Waymo’s because there were significant differences between them. Lidar works by bouncing a laser off nearby objects and capturing it when it bounces back. One of Waymo’s key innovations was to use the same lens for both sending and receiving these laser pulses, significantly reducing the complexity and cost of the lidar system.

Waymo accused Uber of copying this innovation, but Uber says that’s wrong. Uber says it began developing its own lidar in early 2015 and that it uses two lenses for transmitting laser pulses and two more for receiving them. Uber says that’s one of several key differences that demonstrates that its technology isn’t derived from Waymo’s.

Uber’s reply is packed full of other technical details that the company says demonstrate that its lidar is not based on Waymo’s technology. However, most of these details are redacted in the public version of the document.

The document also leaves a big unanswered question: Why did Uber pay around $700 million for Otto if it wasn’t trying to get its hands on key Waymo technologies? It’s possible, of course, that Uber was just optimistic about Otto’s self-driving truck business. Or perhaps Uber felt the Waymo veterans’ general knowledge about self-driving car technology — knowledge not protected by trade secret laws — was worth hundreds of millions of dollars.

But we can expect Waymo to press this point as the litigation continues. While Levandowski has a right to invoke the Fifth Amendment and refuse to testify, Waymo will be able to portray this as a sign that Levandowski did, in fact, break the law as he was leaving Waymo. And it will look for “smoking gun” evidence proving that Levandowski and his colleagues illegally incorporated elements of Waymo’s technology into Uber’s own lidar sensors.