THINGS DON’T LOOK good for Uber and autonomous vehicle wunderkind Anthony Levandowski, the former Google engineer who now leads the startup’s robocar program.

This week, US District Court William Alsup made two decisive decisions in the lawsuit between Google’s autonomous vehicle spinoff Waymo and Uber. You know, the one accusing Levandowski of swiping 14,000 confidential documents from and taking them with him to Uber.

First, Alsup rebuffed Uber’s efforts to settle the case in arbitration, so the drama will play out publicly during a trial. Waymo loved that. “We welcome the court’s decision today, and we look forward to holding Uber responsible in court for its misconduct,” it said in a statement.

More troubling for Levandowski, Alsup referred the case to the US Attorney’s office “for investigation of possible theft of trade secrets based on the evidentiary record supplied thus far.” Translated from legalese, Alsup thinks something criminal might have happened here and that the feds ought to take a look. That raises the possibility of prison time for Levandowski.

Such a referral is “quite, quite rare,” says Peter Toren, an intellectual property lawyer and former Department of Justice attorney. “For a judge to do that, he must believe there’s a lot of smoke, if not fire, for criminal violations.”

Things could go from bad to worse for Uber if the judge grants Waymo’s request to put the brakes on the startup’s robocar testing. As of Friday night, the court had not yet unsealed Alsup’s decision on that, so stay tuned.

Laser Fight

This brouhaha started when Waymo filed the suit on February 23. Waymo claims that Levandowski illicitly downloaded 14,000 technical files, included plans for Waymo’s lidar, the laser sensor that allows autonomous vehicles to “see.” The suit alleges that Levandowski took those documents with him when he quit in early 2016 and launched the autonomous trucking outfit Otto. Uber acquired Otto for $680 million in August and put Levandowski in charge of its robocar research.

Waymo claims Levandowski used its intellectual property to accelerate Uber’s program, which started about four years after Waymo’s. Two weeks after filing the suit, Waymo sought a preliminary injunction forcing Uber to stop using any technology derived from its IP, including the lidar system. This could deliver a crushing blow to Uber’s R&D, because lidar is widely seen as fundamental to the type of vehicles Uber is working on.

Alsup was impressed by the evidence Waymo presented. “You have one of the strongest records I’ve seen for a long time of anybody doing something that bad,” Alsup said during a hearing last week. “Good for you.”

Of course, that doesn’t mean Uber is guilty of anything, but it was enough to convince Alsup to refer all of that evidence, along with everything Uber’s counsel has gathered in the case, to the US Attorney’s office in San Francisco. We’re talking terabytes of information. You can be sure that federal prosecutors will scrutinize it all. “If you get a referral, and I did get one or two in my career, you obviously take that very seriously,” says Toren.

If the DOJ proceeds with a criminal investigation for economic espionage, a conviction for could mean a long prison stint for Levandowski. The market value of any stolen intellectual property weighs heavily in the sentencing calculus, says Toren. “If we’re talking about tens of millions of dollars in value, we’re talking about a very, very lengthy potential prison sentence,” says Toren. Those numbers aren’t outlandish. A recent Boston Global Consulting report estimates the autonomous vehicle market could be worth tens of billions of dollars a year by 2030. Every case is different, of course, but a man recently convicted of stealing $20 million worth of trade secrets received a 15-year sentence.

None of this will happen quickly. Any criminal investigation will unfold slowly, and require cooperation from Waymo—which may not want to help. The company is already locked in a public battle over secretive tech, and helping the US Attorneys Office push a criminal case means ceding all control over what is disclosed and when. “It’s sort of like the adage of dancing with the bear: The dance isn’t over until the bear says it is,” says John Marsh, a lawyer who specializes in trade secrets litigation. (The federal government is the bear here.)

The Lawsuit Rolls On

Uber, however, may be just fine. Even if Levandowski is convicted of a crime, Waymo’s lawyers still must prove any stolen IP made its way into Uber’s technology. So far, it hasn’t connected those dots. “I’ve given you lots of discovery, and so far you don’t have any smoking gun,” Alsup told the company’s lawyers last week.

A criminal investigation could help with that, though. Prosecutors might uncover evidence during discovery, and use the threat of of subpoenas or the promise of leniency to compel testimony. Plus, “people are much more mindful of the consequences of not being truthful with federal prosecutors than lawyers in a civil case,” says Marsh. And if Levandowski is convicted, Waymo’s lawyers could present that as evidence of wrongdoing by Uber—but you can bet Uber’s lawyers would fight against that. (That said, the odds of a conviction coming before the civil trial starts in October are long indeed.)

Given that federal prosecutors are involved now, Uber almost certainly will bar Levandowski from any involvement in further R&D. That’s a setback for its research, but an even bigger setback for its image (not that the company needs much help there) and recruiting. Silicon Valley fetishizes “superstar” talent, and Levandowski is among the best in the business. If he’s driving a desk for the duration, it limits Uber’s ability to attract talent, says Jonathan Matus, CEO of mobile data analytics company Zendrive. “People might ask themselves more questions than they would otherwise,” he says. He is bullish on Uber’s ability to bounce back, but there’s a lot at stake here.

Failure to deliver self-driving tech poses an existential threat to Uber in the long run. Anyone getting there first, could offer a far cheaper rival service by eliminating the need to pay human drivers. “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,” CEO Travis Kalanick told Business Insider last year. But moving forward is hard with federal prosecutors circling your offices.