A Vermont man charged with killing five teenagers in a wrong-way crash almost three years ago was psychotic and delusional at the time and thus legally insane, his lawyer argued Monday during opening statements in his client's murder trial.

The lawyer for Steven Bourgoin acknowledged his client was driving the vehicle that killed the teenagers but said that Bourgoin was "totally out of his mind" at the time, and the attorney said he will present evidence to that effect.

In the days leading up to the Oct. 8, 2016, crash in Williston, Bourgoin believed he was on some sort of secret mission, said Defense Attorney Bob Katims.

"This is a tragedy," Katims said. "The death of these children, horrible."

Deputy Chittenden County State's Attorney Susan Hardin said that during pretrial interviews with mental health professionals, the experts differed on Bourgoin's mental health at the time of the crash. But she said that Bourgoin, while troubled, would meet the legal definition of being sane.

"How could this have happened? Why would someone do this, they'd have to be crazy, right?" Hardin said during her opening statement. "But that's not the question you are being asked to decide. You are going to decide whether he was legally insane at the time."

Bourgoin, 38, has pleaded not guilty to five counts of second-degree murder and other charges stemming from the crash.

Prosecutors allege that Bourgoin left his home that night, got onto the interstate going south and then turned around, heading at speeds approaching 90 miles per hour north in the southbound lane. Just after cresting what's known locally as French Hill, he collided with the car that carried the five teenagers.

The crash killed Mary Harris, 16, of Moretown; Cyrus Zschau, 16, of Moretown; Liam Hale, 16, of Fayston; Janie Cozzi, 15, of Fayston; and Eli Brookens, 16, of Waterbury. Four of the teenagers attended Harwood Union High School in Duxbury. Cozzi attended Kimball Union Academy in Meriden, New Hampshire.

After the initial crash, Bourgoin allegedly stole a Williston police cruiser and again headed south on the interstate before turning around and crashing again. He was initially arraigned at the hospital.

Katims said that he would show how Bourgoin's life deteriorated in the days leading up to the crash. He wasn't sleeping and, in the hours before the crash, he even sought help at the University of Vermont Medical Center emergency room.

"He thinks some government agency is trying to connect with him, FBI, state police, NSA (National Security Agency)," Katims said.

If Bourgoin is found to have been legally insane at the time of the crash, the charges against him would be dismissed and the judge would determine whether he should be hospitalized or treated in the community. If the jury rejects the insanity defense and convicts him of some or all of the criminal charges, the judge would impose a sentence.

Under Vermont law, a conviction of second-degree murder carries a sentence of 20 years to life in prison.