A computer scientist at Fort Lee charged last spring with a hate crime in a bizarre attack on a young black woman who was yanked from her vehicle by the ankles has been found found not guilty by reason of insanity.

Judge Lynn S. Brice of Chesterfield County Circuit Court found Matthew R. Ellis, 27, not guilty by reason of insanity after reviewing reports from two mental health professionals - including one for the prosecution - who concluded that Ellis was insane at the time of the May 3 incident in Chester.

"The evidence supporting the insanity defense was overwhelming in my view," said Todd Ritter, Ellis' attorney.

Ritter noted that the expert appointed to evaluate Ellis for the defense, clinical psychologist Dr. Evan S. Nelson, along with the expert hired by the prosecution, clinical psychologist Dr. Robert G. Gibby Jr., concurred that Elllis was insane.

"The reports indicated that Mr. Ellis was suffering from bipolar disorder, and this was a manic episode with psychotic features," Ellis said.

According to the judge's order, Ellis was committed to the Virginia Department of Behavioral Health and Developmental Services for evaluation to determine whether he may be released with or without conditions or requires continued confinement. Ritter said Ellis will be sent to Central State Hospital in Prince George County.

A hearing was set for Jan. 29 to determined whether Ellis should be released.

Early in the case, Ritter disclosed in court filings that Ellis was paranoid and delusional and that his family had implored him to seek psychiatric help just days before the assault on a black female motorist.

When Ritter first met his client in jail, Ellis claimed Ritter was an "imposter lawyer sent to further the conspiracy and injustice the defendant believes is being perpetrated against him," Ritter said in court papers.

According to a prepared summary of evidence by Chesterfield prosecutor Geoff Easton, Ellis, who lived in Chester, pulled alongside the woman's car at the traffic light on Rivers Bend Boulevard at state Route 10 and began yelling obscenities at her through the open window of his vehicle.

In an attempt to get away, the victim drove onto eastbound Route 10 and Ellis followed her, and when she slowed due to traffic, Ellis rear-ended her vehicle. Ellis then got out, walked to the driver's-side door of the woman's car and yelled that he was going to kill her.

Moments later he opened the woman's door, grabbed her by the ankles and pulled her out. At that point several other motorists stopped their vehicles and three men approached Ellis and tried restraining him.

The men were able to subdue him to the point that the victim was able to escape and run to a nearby office building. But Ellis managed to free himself and he ran to the office building, where he tried to break down the door while yelling he was going to "get" her.

The three men caught up with Ellis and restrained him after he ran around the side of the building, holding him until police arrived. He spat on two Chesterfield officers as he was being placed under arrest.

After initially refusing to answer any questions and keeping his eyes closed, Ellis began making obscene racial comments about the victim. He stated he intended to kill the woman and again used a racial slur to describe her.

Ellis replied "yes" when one of the officers asked if wanted to hurt the woman because of her race.

"He was extremely agitated and vocal during the entire encounter," Easton said.

Ellis was charged with a hate-crime assault of the woman, two counts of assaulting a law-enforcement officer, statutory burglary and reckless driving. He was acquitted of all charges as a result of the judge's finding of not guilty by reason of insanity.

"I was pleased by the outcome and glad to see that Mr. Ellis will now be getting the help he needs," Ritter said. "In fact, there was intervention early on (after the arrest) so my client has been on proper medication for some time, and he is not remotely the same agitated and paranoid person I met shortly after his arrest."

"I was fortunate to have met Mr. Ellis very soon after the incident, and I also heard promptly from his family and numerous coworkers and friends, so it quickly became apparent that this was a mental health breakdown, and that he was not some violent racist," Ritter added. "The victim must have been utterly terrified, and I can assure you Mr. Ellis would have never wanted to be the source of that fright and pain for anyone."

Ellis received high praise from his employer, coworkers and others who vouched for his character, integrity and work ethic in letters submitted to Chesterfield General District Court last year related to a drunken-driving incident for which he was convicted in March 2016.

He was taking Brazilian jiu-jitsu classes to get in shape and receiving treatment from The Meridian Group in Chesterfield to reduce symptoms of anxiety, depression and panic attacks, according to letters in his court file related to the earlier incident.

Ellis served as the database administrator for the U.S. Army Food Management Information System at Fort Lee, a division of the Army's Communications Electronics Command. He began work there in 2008. An Army spokesman said Ellis is on leave without pay pending further review.