Tesla reached a settlement on the eve of its highest-profile trial yet over a crash blamed on Autopilot, the driver-assistance system Elon Musk has billed as crucial to his pursuit of self-driving cars, according to court filings.

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

The trial that was set to kick off this week centered on Walter Huang, a 38-year-old Apple 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. A federal safety agency’s investigation of the accident found that Huang was probably distracted with a video game app on his phone, while also pointing to "limitations” of the Autopilot system.