Bailey Jordan Garcia will go to prison for the fatal middle-of-the-night shooting last winter of a popular Cottage Grove high school teacher. But in pleading guilty to the crime in court Wednesday, Garcia never explained why he did it.

That answer remains muddled in mental health problems, attempted suicides and heavy drinking, Garcia’s attorney said Wednesday after the 19-year-old Pine Springs resident pleaded guilty to shooting David Frigaard with a high-powered rifle on Jan. 24.

“The parties both recognize in this case that it was genuinely a tragedy for two families,” said the attorney, Ryan Pacyga. “There’s no answer to the ‘why?’ We have a situation where a 19-year-old is going to prison for a long time”

Garcia, shaky and tearful before Judge Ellen Maas, acknowledged his guilt and pleaded to unintentional second-degree murder by drive-by shooting for killing Frigaard, who had just left the bar he owned in Willernie when a round Garcia fired from a 30.06 rifle penetrated his lungs and heart.

“Remorse and bewilderment,” is how Pacyga, after the hearing, described Garcia’s mental state. “I think he’s wondering sometimes if this is all a bad dream.”

Frigaard’s family, including his parents, sat directly behind Garcia in the Washington County courtroom while Pacyga and prosecutor Imran Ali peppered him with questions.

Garcia gave mostly one-word answers before being led back to jail to await his sentencing, which Maas set for Aug. 14.

Frigaard left the bar in Willernie — Pine Springs and Willernie are small cities adjacent to Mahtomedi — about 3:30 a.m. Jan. 24 and pulled his vehicle to a stop sign about a block away. That’s when Garcia fired a single round from inside his vehicle, killing Frigaard, 46.

The longtime art teacher in the South Washington School District had been at Park High School in Cottage Grove for about four years, most recently teaching painting, Principal Kerry Timmerman said after the shooting. Frigaard also served as an at-risk program teacher and as an adviser for the school’s gay-straight student group. He had been a girls’ track coach, assistant football coach and middle school football and basketball coach.

Pacyga and the other defense attorney, Anthony Bussa, said Garcia had a history of depression and behavioral disorders and said he couldn’t remember some of what happened that night. Garcia had spent time in a mental hospital, Pacyga said, and during questioning in court Wednesday, Garcia admitted he was medicated for anxiety and depression.

Garcia also was drinking and feeling suicidal the night of the murder, Pacyga said in court.

But Pacyga also said that attorneys didn’t pursue a defense of mental illness or insanity because an adolescent psychiatrist “came to the conclusion that this didn’t rise to the level of that defense.”

That doctor, Carl Malm­quist, could testify at the sentencing, Pacyga said.

Garcia’s “straight” plea Wednesday means that he admitted to the original charges and that no plea bargain was involved. State sentencing guidelines show that Maas could sentence Garcia to 25 years in prison for his crime, although Pacyga said he will argue for a reduced sentence.

Members of both families declined to talk about Wednesday’s plea.

Ali, representing the Washington County Attorney’s office, said he would reserve most of his comments for the sentencing. Frigaard’s relatives welcomed the guilty plea, Ali said, because “it starts the healing process for the victim’s family.”