SAN FRANCISCO (Reuters) - Uber Technologies Inc said on Tuesday it fired the technology whiz it had hired to lead its self-driving unit, Anthony Levandowski, after he failed to comply with a court order to hand over documents at the center of a legal dispute between Uber and Alphabet Inc's GOOGL.O Waymo unit.

Uber had hoped Levandowski, one the most respected self-driving engineers in Silicon Valley, would help the ride services company catch up to rivals including Waymo, in the race for self-driving technology. Instead the hiring led to a court fight and the threat of criminal charges. Uber replaced him as the head of its self-driving car unit in April before finally making the decision to fire him.

Levandowski formerly worked for Alphabet’s Waymo self-driving division, which says he stole trade secrets by downloading more than 14,000 documents before he left. Levandowski is not a defendant, but his actions are at the heart of Alphabet’s lawsuit against Uber.

Uber said in a letter to Levandowski filed in federal court on Tuesday that it was firing him because he had not complied with a court order to hand over the documents. (tmsnrt.rs/2rBPNzW)

He has declined to cooperate, citing his Fifth Amendment right not to incriminate himself. Levandowski’s lawyer did not immediately respond to a request for comment.

Uber and Alphabet are battling over technology expected to revolutionize the way people use cars. Waymo claims its trade secrets made their way into Uber’s Lidar technology, which bounces light pulses off objects so self-driving cars can “see” the road. Uber denies these claims.

Levandowski has 20 days to comply with the court orders, according to the Uber letter.

Last month, Uber named Eric Meyhofer to replace Levandowski as head of its Advanced Technologies Group. Meyhofer will continue to lead the team, an Uber spokeswoman said via email.

The New York Times reported Levandowski's exit earlier on Tuesday, citing an internal email sent to employees. (nyti.ms/2qD4X3h)

FILE PHOTO: A man exits the Uber offices in Queens, New York, U.S., February 2, 2017. REUTERS/Brendan McDermid/File Photo

“Over the last few months Uber has provided significant evidence to the court to demonstrate that our self-driving technology has been built independently,” Angela Padilla, Uber’s associate general counsel for employment and litigation, wrote in an email to employees, cited by the Times.

An Uber spokeswoman confirmed the letter’s authenticity and said the company has urged Levandowski to “fully cooperate.”

Waymo has said Levandowski received stock worth more than $250 million for joining Uber, along with his portion of the $680 million that Uber paid last year for Otto, the self-driving truck company he formed after leaving Google. That amount assumes certain targets would be met, and it was not clear how his firing would affect those payments.

A source familiar with the matter said Levandowski had not yet vested his Uber shares.

LEVANDOWSKI REFUSAL

Levandowski, a top engineer on self-driving technology, has turned into a liability for Uber in court. The company has acknowledged that his refusal to testify has hurt its defense efforts. Uber has never denied that he took the Waymo documents.

Asked last month why Uber did not threaten to fire Levandowski to pressure him into turning over the documents, Uber attorney Arturo Gonzalez told Reuters, “We can fire him but we still don’t get the documents.”

Uber had argued that it was acceptable to sideline Levandowski by preventing him from working on Lidar technology, but not firing him. But U.S. District Court Judge William Alsup criticized the company, telling lawyers: “You keep on your payroll someone who took 14,000 documents and is liable to use them.”

The judge theorized that Levandowski could have used Waymo’s documents himself even if he did not turn them over to Uber.

“What prevented him from bringing a laptop to work every day and consulting the files?” Alsup asked Uber lawyers in April.

Uber has been hit by a string of departures of senior executives and other negative news. Earlier this year, Uber was caught using its technology to avoid government regulators. Chief Executive Officer Travis Kalanick was seen on video berating an Uber driver, and the company also faced accusations of sexual harassment that led to an internal probe led by former U.S. Attorney General Eric Holder.

The Holder report will be shown to the board this week, a source familiar with the matter said, adding that next week, Uber plans to speak with employees about it.