Tesla has settled a lawsuit over a car crash which killed an Apple engineer in 2018 after his car veered off a highway near San Francisco, court documents showed.

The settlement was made as the trial was about to start over the high profile accident involving Tesla’s driver assistant technology, ending a five year legal battle over the case, The Guardian reported.

The terms of the settlement were not disclosed.

The report said the case involved a highway accident which killed Walter Huang. Tesla had contended Huang misused the system because he was playing a video game just before the accident. Tesla said Huang failed to stay alert and take over driving. “There is no dispute that, had he been paying attention to the road he would have had the opportunity to avoid this crash,” Tesla said in a court filing.

According to the Guardian, National Transport and Safety Board (NTSB) officials who investigated the crash in 2020 found Huang made no attempts to stop his vehicle as it sped towards a crash barrier on US Highway 101 near Mountain View, California, before the 2018 crash. Investigators also found that Huang was playing a video game on his smartphone at the time of the fatal crash.

Huang’s family had alleged Autopilot steered his 2017 Model X in to a highway barrier. Lawyers for Huang’s family also raised questions about whether Tesla understood drivers likely would not or could not use the system as directed and what steps the automaker took to protect them.

The Guardian noted the settlement may have provided a blueprint for others suing over Autopilot. Tesla faces a flurry of lawsuits over crashes related to its alleged use, putting the automaker at risk of large monetary judgments.

“It is striking to me that Tesla decided to go this far publicly and then settle,” Bryant Walker Smith, a law professor at the University of South Carolina with expertise in autonomous vehicle law said. “What this does do, though, is it says to other attorneys, we might settle. We might not always fight it. That is the signal.”

The report said the crash that killed Huang was among hundreds of US accidents in which Autopilot was a suspected factor in reports to auto safety regulators.

The US National Highway Traffic Safety Administration (NHTSA) has examined at least 956 crashes in which Autopilot was initially reported to have been in use. The agency separately has launched more than 40 investigations into accidents involving Tesla automated-driving systems that resulted in 23 deaths.

Amid the NHTSA scrutiny, Tesla recalled more than 2m vehicles with Autopilot in December to add more driver alerts. The fix was implemented through a remote software update, the Guardian said.

Huang’s case followed two previous California trials over Autopilot that Tesla won by arguing the drivers involved had not heeded its instructions to maintain attention while using the system, the report added.