SAN FRANCISCO — Anthony Levandowski, once one of Silicon Valley’s top autonomous-driving engineers, pleaded guilty Thursday to stealing a trade secret from Google, his former employer, according to a court filing.

The guilty plea, which could lead to a prison sentence, is the latest twist in a years-long saga of conflict and courtroom drama for the 40-year-old entrepreneur. He quit Google In 2016 to join Uber as the head of its self-driving-car effort before he was fired amid allegations that he took proprietary documents from Google. He agreed to plead guilty to one of the 33 charges against him in exchange for federal prosecutors dropping the other charges, according to the filing.

“Mr. Levandowski accepts responsibility and is looking forward to resolving this matter,” said his attorney, Miles Ehrlich, in an emailed statement. “Mr. Levandowski is a young man with enormous talents and much to contribute to the fast-moving world of [artificial intelligence] and [automated vehicles] and we hope that this plea will allow him to move on with his life and focus his energies where they matter most.”

A spokesman for the U.S. attorney’s office declined to comment.

Earlier this month, Levandowski filed for bankruptcy protection after a court ordered him to pay $179 million to Google in a civil case stemming from the trade-secret theft. Levandowski is now locked in a dispute with Uber over who is responsible for paying that judgment.

The guilty plea marks an end to what is both a Silicon Valley success story and tragedy. After Levandowski’s start-up was acquired by Google, an accomplishment in its own right, he went on to co-found “Project Chauffeur” in 2009, Google’s then-secret autonomous driving effort. That effort kicked off a wave of investment and public excitement over the prospect of cars that require no drivers, and Waymo, as the Google project is now called, is considered the leader in the field.

Levandowski left Google to found Otto, an autonomous-trucking company. Uber, then considered a major competitor to Waymo in autonomous driving, acquired Otto later that year for $700 million. That sum was later whittled down significantly because Otto employees, including Levandowski, either left or were terminated before their stock options were allowed to vest.

Six months after the acquisition, Google sued Uber, alleging that the ride-share company conspired with Levandowski to steal trade secrets from Waymo. Uber agreed to pay more than $244 million to Google in a February 2018 settlement.

But the settlement didn’t end Levandowski’s problems. During the civil dispute, Levandowski exercised his Fifth Amendment rights against self-incrimination when he refused to turn over documents in the case. That prompted the judge in that case to recommend federal prosecutors for the Northern District of California to open an investigation into the matter.

The ensuing investigation led to a 33-charge indictment, filed in August. The charges included allegations that Levandowski stole schematics for Waymo’s Lidar design, a type of radar autonomous cars use to detect obstacles in the road.

Levandowski admitted to taking a single spreadsheet called “Chauffeur TL Weekly Updates — Q4 2015.” According to court documents, the file contained quarterly goals and weekly metrics and the objectives and key results for Levandowski’s team. It also included a summary of technical challenges the team faced and some that had been overcome.

Levandowski admitted downloading the file to his personal laptop in January 2016. He last accessed the file on Feb. 24, 2016, about a month after leaving Google. The file was valued at between $550,000 and $1.5 million, for the purpose of sentencing guidelines.

In an emailed statement, a Waymo spokeswoman said the case “brings to an end a seminal case for our company," and said Levandowski’s guilty plea “underscores the value of Waymo’s intellectual property."

Levandowski agreed to pay Google’s costs for its cooperation in the criminal investigation, a sum of $756,000.

Prosecutors can ask for a prison sentence of up to 24 to 30 months as part of the agreement. If Judge William Alsup accepts the plea, he would preside over an eventual sentencing.