(Bloomberg) -- Tesla Inc. reached a settlement on the eve of its highest-profile trial yet over a crash involving Autopilot, the driver-assistance system Elon Musk has billed as crucial to his pursuit of self-driving cars.

Terms of the settlement weren’t disclosed in court filings made public Monday in state court in San Jose, California.

The case centered on Walter Huang, a 38-year-old Apple Inc. engineer who was killed on the way to work in 2018 when his Model X veered off the highway and slammed into a roadside barrier at about 71 miles (114 kilometers) per hour. The National Transportation Safety Board’s investigation found that Huang probably was distracted by a video game app on his iPhone, while also pointing to “limitations” with the Autopilot system.

The electric-vehicle maker prevailed in two previous trials in California after juries found the accidents — one fatal and one not — were due to driver error rather than the company’s technology. Each of the trials, and more that are scheduled in coming months in California and Florida, clash with Musk’s mantra that Teslas are the safest cars ever made. 

Read More: Tesla Faces Trial Over Apple Engineer’s Fatal Autopilot Crash

“This is an important data point,” said Bryant Walker Smith, a University of South Carolina law professor and automated-driving expert. “It doesn’t guarantee future outcomes but it does tell the story of a company that is not publicly invincible.”

He said it’s not unusual for cases to be resolved on the eve of trial, but it is surprising that Tesla settled this one.

“At this point everybody already had their script — it’s just kind of doing the math,” he said. “I suspect each side looked at their chances and Tesla decided that publicly settling was preferable to possibly losing in court.”

Tesla and a spokesperson for the Huang family’s lawyers didn’t respond to requests for comment.

The trial would have featured testimony from several current and former Tesla engineers. The settlement comes as Musk has vowed to unveil a robotaxi on Aug. 8, roughly four months from now. As electric vehicles become more mainstream, Tesla’s push into artificial intelligence and autonomous driving has been key to its lofty valuation.

Read More: Tesla Shares Jump as Investors Buy Into Musk’s Robotaxi Hype 

Tesla has faced increasing regulatory scrutiny over the safety of Autopilot and the software it markets as Full Self-Driving. In December, Tesla rolled out over-the-air software updates for more than 2 million vehicles after the National Highway Traffic Safety Administration said Autopilot didn’t do enough to guard against misuse. 

Tesla’s website describes Autopilot as “an advanced driver-assistance system that enhances safety and convenience behind the wheel.” The company says that Autopilot enables its vehicles to steer, accelerate and brake automatically, but that the system’s features require “active driver supervision and do not make the vehicle autonomous.”

Musk, Tesla’s chief executive officer, has always taken an aggressive approach to litigation. In May 2022, he announced that Tesla was building a “hardcore litigation department” that would initiate and execute lawsuits. The Austin-based company has a long history of going to great lengths to defend itself in court. 

Beyond their claims against Tesla, the Huangs also alleged that California’s transportation department was partly to blame for failing to fix the barrier that had recently sustained damage from another crash. Had it been repaired, they said, it might have absorbed the impact of the Model X collision and saved Walter Huang’s life.

The court’s docket indicates that the claims against the highway department are still pending. The department’s press office didn’t immediately respond to a request for comment.

(Updates with law professor’s comments, Tesla’s litigation history.)

©2024 Bloomberg L.P.