HAGATNA, Guam (AP) — The final defense witness in the murder trial of a man charged with killing three Japanese tourists in a Guam resort area testified that the defendant was insane during last year's rampage.

Chad Ryan DeSoto plunged into a downward spiral of psychotic depression after the loss of two anchors in his life: his grandfather who died and his girlfriend who lived in Utah, forensic psychiatrist Dr. Martin Blinder testified Wednesday.

DeSoto, 22, is charged with aggravated murder, accused of running a car onto a sidewalk, ramming into a convenience store, then getting out and stabbing bystanders. Kazuko Uehara, 81, and Rie Sugiyama, 29, were stabbed to death. Hitoshi Yokota, 51, was hit by a car and died in a hospital two days later. Another 11 people were hurt in the February 2013 attack.

"From a purely clinical perspective, there is no possible alternative explanation that I can come up with to explain why he did what he did except that he was operating, he was driven by a psychosis and this psychosis drove out the good parts of him — the parts that would know this is not acceptable," Blinder said. "He had no capacity to weigh these thoughts. His mind was no longer functioning like a normal person. His mind was functioning like an insane person."

Blinder said several times during his testimony that DeSoto is crazy.

DeSoto has pleaded not guilty by reason of mental illness. The defense rested its case after Blinder's testimony.

Prosecutors were expected to call five rebuttal witnesses Thursday.

The judge had yet to rule on a motion accusing DeSoto of witness tampering and obstruction of justice. Prosecutors said he inappropriately spoke with two witnesses from jail.