SAN FRANCISCO — Uber’s top lawyer threatened to fire one of the company’s star engineers if he did not comply with a lawsuit, according to a court filing on Thursday, the latest dramatic turn in a legal battle between two technology giants.

The case involves an explosive claim from Waymo, the self-driving car unit spun out of Google. Waymo accused Uber of conspiring with a former Google engineer, Anthony Levandowski, to steal trade secrets from Google for Uber’s autonomous vehicle designs. Uber purchased Otto, the start-up Mr. Levandowski formed after leaving Google, for nearly $700 million.

Mr. Levandowski, who is not being sued, has remained silent. In March he exercised his Fifth Amendment rights against self-incrimination, an attempt to avoid what his legal counsel said was the potential for criminal charges.

The letter from Uber’s top lawyer orders Mr. Levandowski, who oversees most of Uber’s autonomous vehicle research efforts, to comply with the court’s investigation into the more than 9.7 gigabytes of data Waymo has accused him of stealing, or else face “adverse employment action,” which may include the loss of his job. That could include testifying or turning over any Waymo data he may have.

“While we have respected your personal liberties, it is our view that the court’s order requires us to make these demands of you,” Salle Yoo, Uber’s general counsel, said in the letter. “We insist that you do everything in your power to assist us in complying with the order.”

The letter ratchets up the increasingly bitter fight between Uber and Waymo, which are deadlocked in competition as they develop autonomous vehicles, considered by many to be the future of transportation. The outcome of the case may affect who wins or loses in perfecting the technology, which has also attracted other technology companies, automakers, start-ups and components manufacturers.

It is also the first public sign of a split between Mr. Levandowski and Uber, which to date has not attempted to force him to cooperate with the investigation.

In recent weeks, Uber has attempted to minimize the fallout internally around its self-driving research arm. Mr. Levandowski voluntarily stepped down from reporting directly to Travis Kalanick, Uber’s chief executive, and has recused himself from any decisions made on lidar technology, a crucial component in autonomous vehicles.

That has not been enough. In a court ruling last week, Judge William Alsup, who is presiding over the case, barred Mr. Levandowski from any work on lidar and ordered Uber to produce a timeline of the events leading to Mr. Levandowski’s hiring, including all oral and written discussions about lidar technology. Judge Alsup also ordered Uber to do what it could to ensure the return to Waymo of any files that were allegedly stolen, including the possibility of terminating Mr. Levandowski’s employment at Uber.

“If you comply with these requirements, your employment at Uber will continue on an at-will basis,” Ms. Yoo wrote. “We continue to believe that no Waymo trade secrets have ever been used in the development of our self-driving technology, and we remain confident that we will prove that fact in due course.”

Press officers from Uber and Waymo declined to comment on the letter from Uber. A lawyer representing Mr. Levandowski did not respond to a request for comment late Thursday evening.