SAN FRANCISCO (KGO) -- The man accused of driving his family off Devil's Slide into the Pacific Ocean is eligible for mental health diversion, a judge has ruled.
The judge granted defendant Dharmesh Patel's request to be placed in a mental health program.
The ruling could force prosecutors to drop the charges against him.
Patel's attorneys say he suffers from a major depressive disorder.
MORE: Man accused of intentionally driving family off Devil's Slide cliff pleads not guilty to charges
San Mateo County District Attorney Steve Wagstaffe said he was expecting more accountability.
"We think when we have a violent crime such as this, this wasn't a man thinking - he was going to kill his family, he did everything in his power to kill his family and somehow by the grace of God and the quality of Tesla he was driving, they survived. But it does disappoint us because we do not think people who commit crimes like this should be granted this leniency for mental health diversion," Wagstaffe said.
Wagstaffe said Patel will be released from custody in about three weeks.
He will be living at his parents home in Belmont where he will undergo treatment for the next two years.
In January 2023, Dharmesh Patel allegedly drove his Tesla off Devil's Slide in Pacifica.
Firefighters were forced to cut his family, including Patel's 41-year-old wife, 7-year-old daughter and 4-year-old son, out of the wreckage.
It was a drop of 300 feet and first responders said it was a miracle they all survived.
During the investigation, prosecutors said Patel's actions were intentional, Patel's defense said his actions were due to his mental instability.
We spoke with legal analyst Steven Clark.
"It's important to recognize that this is a man who took an oath to save lives, not to kill people. And I think the defense demonstrated this was completely out of character and never would have happened, but for his mental illness, and they said look at his prior history," Clark said.
Patel facing three counts of attempted murder, had support from his wife who vouched for him.
"The fact that his family came forward and said give him a second chance, this may not have happened if his wife came to court and said he needs to go to jail," Clark said.
The judge stated that "after review of all the evidence" Patel's mental illness was "major depressive disorder."
"The legislature says, we want to look at treatment programs instead of incarceration. The question will be, does Dr. Patel follow through with his treatment program," Clark said.
There will be a hearing on July 1 to work out the details.
"But at the end of the day if these charges are dismissed, he may actually be able to go back and practice medicine," Clark said.