DETROIT -- A federal judge's order that bars Uber from using technology taken by a star engineer before he left Waymo is bad news for Uber and likely will hurt the ride-hailing company's own self-driving research, according to legal experts.

The ruling by District Judge William Alsup in San Francisco Monday was mainly a victory for Waymo, the autonomous car unit spun off from Google.

Waymo showed "compelling evidence" that a former Waymo engineer named Anthony Levandowski downloaded thousands of confidential files before leaving the company, the order said. Levandowski set up his own firms, which then were sold to Uber for $680 million. Evidence showed that Levandowski and Uber planned the acquisitions before Levandowski left Waymo, Alsup's order said.

"He clearly believes that Levandowski is guilty as sin and that Uber hired him, knowing this full well," said John Coffee, a Columbia University law professor who specializes in white-collar crime and corporate governance. "He is ruling that some of this information is stolen (or "misappropriated") and in the long run that will likely have a devastating impact on Uber."

Waymo sued Uber in February alleging that the ride-hailing company is using stolen self-driving technology to build its own autonomous cars. Monday's ruling prevents Uber from using the technology on a laser navigational tool called Lidar that robotic cars use to see what's around them.

"The bottom line is the evidence indicates that Uber hired Levandowski even though it knew or should have known that he possessed over 14,000 confidential Waymo files," Alsup wrote. "At least some information from those files, if not the files themselves, has seeped into Uber's own Lidar development efforts." Uber was ordered to return all downloaded materials to Waymo by noon on May 31.

Alsup ordered Uber to remove Levandowski from any role in Lidar, and that it stop him from copying or otherwise using the downloaded materials.

Waymo sought to shut down Uber's Lidar research that it says uses Waymo files and patented technology until the dispute is settled. But Alsup determined that Waymo's patent infringement theories were too weak to support such an order. The judge ruled that although it's hard to imagine that Levandowski "plundered Waymo's vault the way he did" with no intent to use the material, Waymo still fell short of showing that the trade secrets were used.

Uber said in a statement Monday that it's pleased the court allowed it to continue the research, including its own Lidar innovations. "We look forward to moving toward trial and continuing to demonstrate that our technology has been built independently from the ground up," the statement said.

Messages were left Monday for lawyers representing Levandowski and the companies he formed.

Waymo, which is part of Google parent Alphabet Inc., said it welcomed the order stopping Uber from using "stolen documents containing trade secrets."

The ruling, coupled with Alsup's order last week referring the case to federal prosecutors, signals that Alsup is leaning toward Waymo based on evidence thus far, said Carl Tobias, a law professor at the University of Richmond.

Alsup's order suggests there's evidence that Levandowski could face federal prosecution, and there's circumstantial evidence that Uber may have violated federal trade secret theft laws, said Barbara McQuade, a former U.S. Attorney in Detroit who now is a law professor at the University of Michigan.

Federal law covers both the person who stole a trade secret and anyone who "receives, buys or possesses it, knowing the same to have been stolen," McQuade said.

A civil remedy may not be adequate in this case since Levandowski has invoked his Fifth Amendment right against self-incrimination when questioned by Waymo attorneys, she said.

The high-stakes case now will proceed to evidence exchanges between both sides and will go to trial if not settled, Tobias said. That could take months or more than a year.

The ruling will hamper Uber's ability to develop a self-driving car more quickly than Waymo, Coffee said, but it's too early to say if Uber will be crippled by the ruling.

Levandowski formed Ottomotto, a self-driving vehicle startup, on Jan. 15, 2016. Twelve days later, he resigned from Waymo without any notice. The following August, Uber bought Ottomotto and hired Levandowski to lead its self-driving car efforts.

Last week Alsup took the rare step of referring the case to federal prosecutors for an investigation of possible criminal misconduct. The U.S. Attorney's Office in San Francisco hasn't responded to requests for comment.

Also Monday, Waymo confirmed that it is teaming up to test autonomous vehicles with Lyft, Uber's main ride-hailing competitor, in a potential challenge to Uber.

-----

Auto Writer Dee-Ann Durbin contributed to this report.