(Reuters) - A gunman who killed two university students and wounded four in a mass shooting in North Carolina in April pleaded guilty to murder in a Charlotte court on Thursday, in a deal sparing him the death penalty, the Charlotte Observer and ABC News reported.

FILE PHOTO: Trystan Andrew Terrell, 22, of Charlotte, North Carolina is pictured in this undated handout booking photo obtained by Reuters May 1, 2019. Mecklenburg County Sheriff's Office/Handout via REUTERS

The plea to two counts of murder and four counts of attempted murder by Trystan Andrew Terrell, 22, a college drop out from the University of North Carolina at Charlotte, angered some relatives of the victims, the Charlotte Observer and other media reported.

Julie Parlier, the tearful mother of one of the two deceased UNC Charlotte students, objected to the plea deal and told the court, “May he rot in hell.”

She said that he should have shot himself instead of her son, Ellis Parlier, 19, and the others in a UNC Charlotte classroom, the newspaper reported.

The case, in which Terrell opened fire in a crowded classroom, made national news as part of a spate of mass shootings in the United States. It also drew attention because of the actions of another student, 21-year-old Riley Howell, who tackled Terrell, enabling authorities who arrived on the scene to disarm him, according to police.

Howell, 21, who was mortally wounded and died in the incident, is credited with saving many others in the UNC Charlotte classroom that held about 50 students.

Defense attorney Michael Kabakoff, who represented Terrell, told the court that his client suffered from developmental disabilities and other ailments.

“He’s not the worst of the worst,” he said, arguing for his client’s life, the Observer reported.

Terrell told the court, “If I could go back in time, I would back out of it,” news media reported. “I am so sorry. I made a mistake.”

Terrell was sentenced to life in prison without possibility of parole by Mecklenburg Superior Court Judge Robert Bell, media reported.

Neither the district attorney nor Terrell’s lawyer were immediately available to Reuters early Friday.