Updated

A 74-year-old South Dakota man accused of fatally shooting his long-ago classmate in a grudge reaching back decades pleaded guilty but mentally ill on Tuesday to a second-degree murder charge.

Carl Ericsson was charged in the Jan. 31 killing of retired Madison High School teacher and track coach Norman Johnson. Johnson was shot twice in the face after answering his door at his home in Madison. Johnson's wife, Barbara, found him lying on the floor and saw a man walking to a dark sedan that was parked outside.

An arrest affidavit suggests the incident might have been sparked by a decades-old grudge that originated when Johnson and Ericsson were students at Madison High.

Ericsson told Judge Vince Foley on Tuesday that he rang the doorbell at Johnson's house but first asked his old classmate to verify his identity before shooting him with a .45-caliber pistol.

"I guess it was from something that happened over 50 years ago," Ericsson said during his arraignment hearing. "It was apparently in my subconscious."

Ericsson didn't specify what decades-old incident sparked the grudge, and Lake County State's Attorney Kenneth Meyer said he, too, had no idea what prompted the shooting.

"That's why it's beyond senseless," Meyer said after the hearing.

Ericsson pleaded not guilty to a first-degree murder charge in February and requested a jury trial. But Meyer and defense attorney Scott Bratland announced May 1 that a deal had been reached.

The first-degree murder charge could have carried the death penalty if prosecutors chose to pursue it. The second-degree murder charge carries a mandatory punishment of life in prison.

Johnson's widow and daughters declined comment after the hearing.

To support Ericsson's plea, Bratland submitted an affidavit from psychiatrist Robert Giebink that said Ericsson has a long history of anxiety problems and suffers from "severe and recurrent depression that is, for the most part, treatment resistant."

Giebink said he tried a number of different antidepressants, mood stabilizers and sleep medications on Ericsson, but he often did not tolerate medicine well. Ericsson was significantly depressed and had suicidal thoughts when he came into Giebink's office in January, the doctor said.

"Thinking was irrational. Judgment was impaired," Giebink wrote. "He made the comment that he wished each night that he would not wake up in the morning."

Giebink added that Ericsson, at the time, was not making threats to anyone else.

A defendant can be sentenced to the state penitentiary under South Dakota's "guilty but mentally ill" law. Treatment for the mental illness can be given in prison, or the inmate can be transferred to other facilities under the jurisdiction of the Department of Social Services for treatment and then returned to the penitentiary to complete his or her sentence.

Ericsson's brother, Madison resident Dick Ericsson, said in an affidavit filed shortly after the shooting that his brother suffers from depression and alcoholism and that the two had last talked about six months earlier.

Dick Ericsson said his brother was a sports manager at Madison High years ago and "there was an incident where Norm Johnson did something to Carl," and he held a grudge.