A 73-year-old South Dakota man accused of fatally shooting his long-ago classmate will plead guilty but mentally ill to a second-degree murder charge, his attorney said Tuesday.

Carl Ericsson has been 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. Johnson's wife, Barbara, found him lying on the floor and saw a man walking to a dark sedan parked outside.

An arrest affidavit suggests the incident might have been sparked by a decades-old grudge stemming back to when Johnson and Ericsson were students at Madison High. No new details emerged during Tuesday's court hearing.

Ericsson, bearded and with gray hair, sat in the courtroom wearing gray and white prison scrubs and headphones to amplify the judge's and lawyers' microphones.

He pleaded not guilty to a first-degree murder charge in February and requested a jury trial. That charge can carry the death penalty if prosecutors choose to pursue it. The second-degree murder charge to which Ericsson is to plead guilty carries a mandatory punishment of life in prison.

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.

Defense attorney Scott Bratland said during the hearing that Ericsson has been examined by a psychiatrist but an affidavit has not been finalized. He was not available for comment afterward.

Lake County State's Attorney Kenneth Meyer was asked after the hearing whether the plea agreement was acceptable to Johnson's widow, Barbara.

"I can't speak for her," he said. "I can tell you we talked to her."

Meyer also said he could not comment on a motive or evidence while the case is pending.

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 the two last talked about six months earlier. He 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.

Barbara Johnson and her two daughters sat in the front rows on the prosecution side of the courtroom during the hearing. They declined to comment afterward.

Ericsson is scheduled to be arraigned May 15.