The man charged with wounding then-Rep. Gabrielle Giffords and murdering six others in a January 2011 shooting spree has pleaded guilty.

Jared Lee Loughner, his legal team and a psychiatrist appeared in court in Tucson, Ariz., on Tuesday to make the case that Loughner, though schizophrenic, was now on medication and cognizant of what he had done.

Judge Larry Burns accepted the premise that Loughner, 23, was psychologically capable of understanding the terms of a plea deal and admitting to taking responsibility for his actions.

During the year Loughner has spent in a psychiatric hospital, medical professionals determined that he no longer exhibits the symptoms of a man too disoriented and deranged to, on his own volition, claim innocence or guilt.

“I am not now on or under the influence of any drug, medication, liquor or other intoxicant or depressent, which would impair my ability to fully understand the terms and conditions of this plea agreement,” Loughner contended in his written Waiver of Rights, which he signed in neat cursive at the end of the 14-page plea agreement released after the hearing.

The official plea agreement holds Loughner guilty on 19 counts, which includes the assassination attempt against Giffords and the murders of a federal official and federal employee: U.S. District Chief Judge John Roll and Giffords aide Gabriel Zimmerman, respectively.

He will spend his life in prison under the terms of this deal brokered between the defense and prosecution. Had he not taken the deal and had Burns not been convinced of his mental stability, Loughner could have faced the death penalty if he had been convicted at trial.

In a statement released early Tuesday, Giffords’ husband, Mark Kelly, expressed satisfaction with the outcome.

“Avoiding a trial will allow us — and we hope the whole Southern Arizona community — to continue with our recovery and move forward with our lives,” Kelly said.

Rep. Ron Barber (D-Ariz.) was among the 13 individuals wounded during Loughner’s rampage.

Barber, who was Giffords’ district director at the time, subsequently won a special election to succeed the Congresswoman, who resigned from the House in January to focus on her recovery.

“My hope is that what happened today in court can help all of us move forward and continue our healing process. I believe justice was done today,” Barber said in a statement after the court proceedings. “It is important to me that this individual never again is in a position in which he can cause harm to anyone.”

He added: “There isn’t a day that goes by that I don’t think of the six people who died that day, the families who lost loved ones and the others who were wounded.”