By ELLIOT SPAGAT AND BOB CHRISTIE, THE ASSOCIATED PRESS

TUCSON, Ariz. -- Jared Lee Loughner has pleaded guilty to going on a rampage in Tucson, Ariz., that left six dead and wounded then-Congresswoman Gabrielle Giffords and 12 others.

Loughner's plea Tuesday allows him to avoid the death penalty in a mass shooting that gained worldwide attention in January 2011 because his intended target was the congresswoman. Among the dead were Arizona's chief federal judge and a Giffords' aide.

Federal Judge Larry A. Burns had found that Loughner was mentally unfit to stand trial. He ruled on Tuesday that months of forcibly medicating him to treat his schizophrenia made him competent to understand the gravity of the charges against him and assist in his own defense.

Loughner is expected to be sentenced to life in prison without parole.

THIS IS A BREAKING NEWS UPDATE. Check back soon for further information. AP's earlier story is below.

Former Rep. Gabrielle Giffords is satisfied with Tuesday's expected plea agreement from the man accused of shooting her and many others in a deadly rampage at one of her political events, and she hopes it will allow victims of the mass shooting to move on with their lives.

Jared Lee Loughner is expected to plead guilty in federal court in Tucson, Ariz., as part of an agreement that will allow him to avoid the death penalty in the shooting that left six people dead, including a federal judge, and wounded Giffords and 12 others.

"The pain and loss caused by the events of Jan. 8, 2011, are incalculable," Giffords said in a joint statement with her husband, Mark Kelly. "Avoiding a trial will allow us - and we hope the whole Southern Arizona community - to continue with our recovery."

Later Tuesday, the legal team defending Loughner will have to convince a judge that he is competent enough to enter a plea.

The 23-year-old college dropout is scheduled to attend a hearing during which his attorneys and prosecutors will try to persuade U.S. District Court Judge Larry A. Burns that Loughner is no longer mentally unfit for trial.

Experts had concluded that Loughner suffers from schizophrenia, and officials at a federal prison have forcibly medicated him with psychotropic drugs for more than a year. A court-appointed psychiatrist is expected to testify Tuesday that he is competent to enter a plea.

If Burns agrees, as legal experts expect, a formal change-of-plea hearing will follow. That's when those in the court will hear from Loughner at length for the first time, as the judge questions him about the agreement and changing his plea to guilty.

Burns may ask Loughner to recite his actions in his own words, but either his lawyer or the federal prosecutor could just read the facts of the January 2011 shooting spree at a Tucson supermarket, where Giffords was holding a meet-and-greet with constituents.

Either way, Loughner will be asked to acknowledge that he shot and killed six people, including the top federal judge in Arizona, and wounded 13 others, including Giffords. He'll need to convince Burns he understands what is going on, what he's doing and what he did.

Loughner could break down, change his mind about pleading guilty or show so little understanding of what he's doing that Burns rejects the plea, lawyers not involved in the case said Monday.

"The fact that there is this planned change of plea is no guarantee that it will go forward," said Paul Charlton, a former U.S. attorney for Arizona. "There are any number of things that would happen that would either cause it to be removed from the calendar or not go forward at all."

The plea agreement that is expected to be made public on Tuesday would see Loughner sentenced to life in prison, taking the possibility of the death penalty off the table in the federal case, a person familiar with the case told The Associated Press on Saturday. The person was not authorized to discuss the case publicly and spoke on condition of anonymity.

An agreement that would spare Loughner the death penalty offers something for both sides, said Quin Denvir, a California defense attorney who has worked with Loughner attorney Judy Clarke on the case against unabomber Ted Kaczynski.

Prosecutors would avoid a potentially lengthy and costly trial and appeal, knowing that the defendant will be locked up for life. Clarke managed to avoid the death penalty for other high-profile clients such as Kaczynski and Eric Rudolph, who bombed abortion clinics in the late 1990s and Atlanta's Olympic park in 1996.

The top prosecutor in southern Arizona's Pima County said last year that she may file state charges in the case that could carry the death penalty. An official in the prosecutor's office, Amelia Craig Cramer, declined to comment, saying the office did not have an active prosecution against Loughner.

Denvir said it was possible that the plea agreement calls for the state to avoid pursuing criminal charges against Loughner, though that's not a given.

"Ideally (as a defense attorney) you'd like to have it resolved all at once, but sometimes you have to take one at a time," he said.

The decision to spare Loughner a federal death sentence makes sense, said Dale Baich, a federal public defender in Phoenix who handles capital case appeals and isn't involved in the case.

"As time went on and there were numerous evaluations, I think everybody had a better understanding of Mr. Loughner's mental illness." Baich said.

He added: "It appears that he will need to be treated for the rest of his life in order to remain competent."

___

Christie reported from Phoenix. Associated Press writers Pete Yost in Washington and Barry Massey in Santa Fe, N.M., contributed to this report.

Related on HuffPost:

Loading Slideshow...
  • Open Your Eyes (Snow Patrol)

    <a href="http://www.huffingtonpost.com/2011/01/12/obama-gabrielle-giffords-opens-eyes_n_808346.html" target="_hplink"><strong>(Jan. 8, 2011) --</strong></a> Four days after <a href="http://www.huffingtonpost.com/2011/01/08/gabrielle-giffords-shot-c_n_806211.html" target="_hplink">Rep. Gabrielle Giffords (D-Ariz.)</a> was wounded in a grisly shooting, President Barack Obama informed memorial service members that she opened her eyes for the first time. "I can tell you this," Obama said. "She knows we're here and she knows we love her and she knows that we will be rooting for her throughout what will be a difficult journey." (AP Photo/Chris Carlson)

  • Stand (Rascal Flatts)

    <strong><a href="http://www.huffingtonpost.com/2011/01/19/gabrielle-giffords-stands-on-two-feet_n_811355.html" target="_hplink">(Jan. 19, 2011) --</a></strong> Outside the University of Arizona's Medical Center, a decorated paper plate offered well wishes for the Tucson shooting victims. With assistance from doctors, Giffords stood on her own two feet for the first time since the incident. The congresswoman was soon transferred to TIRR Memorial Hermann Rehabilitation Hospital in Houston, one of the top-rated rehab facilities in the country. (AP Photo/Susan Montoya Bryan)

  • Stand By Me (Ben E. King)

    <strong><a href="http://www.huffingtonpost.com/2011/05/16/gabrielle-giffords-shuttle-launch_n_862400.html" target="_hplink">(May 16, 2011) --</a></strong> In this Feb. 2011 file photo, Giffords' husband Mark Kelly held a wrist band decorated with a peace sign, heart and the word 'Gabby'. By mid-May, Giffords was watching Kelly fly off into space on NASA's Endeavour expedition. The couple exchanged their wedding rings before takeoff. (Photo by Eric Kayne/Getty Images)

  • Fighter (Christina Aguilera)

    <a href="http://www.huffingtonpost.com/2011/06/28/gabrielle-giffords-public-appearance_n_885772.html" target="_hplink"><strong>(June 28, 2011) --</strong></a> Giffords made her first public appearance since being wounded in the Jan. 2011 shooting, attending a ceremony at Texas' Space Center Houston with Kelly. She received a standing ovation from the crowd. (AP Photo/southwestphotobank.com, P.K. Weis)

  • You're The Inspiration (Chicago)

    <a href="http://www.huffingtonpost.com/2011/08/01/gabrielle-giffords-debt-ceiling-vote_n_915569.html" target="_hplink"><strong>(Aug. 1, 2011) --</strong></a> Giffords completed her first House floor appearance since the shooting, attending a vote on the debt ceiling. "The reaction in the chamber was the most enthusiastic, exuberant, exhilarating -- I mean we were all crying -- thrilled -- you know, we just knew she would make a triumphant return," Rep. Debbie Wasserman Schultz (D-Fla.) said. (AP Photo/House Television)

  • Don't Stop (Fleetwood Mac)

    <a href="http://www.huffingtonpost.com/2011/08/30/gabrielle-giffords-walking-writing_n_941894.html" target="_hplink"><strong>(Aug. 30, 2011) --</strong></a> Via a Giffords spokesperson, the Associated Press learned that less than eight months after being wounded, the congresswoman was walking and writing on her own. (Photo by P.K. Weis/Giffords Campaign via Getty Images)

  • I Didn't Know My Own Strength (Whitney Houston)

    <a href="http://www.huffingtonpost.com/2011/11/10/gabrielle-giffords-tv-interview_n_1087420.html" target="_hplink"><strong>(Nov. 10, 2011) --</strong></a> Giffords' first TV interview since the shooting went to ABC News. The congresswoman answered questions with a clear voice, telling host Diane Sawyer that she felt "pretty good." Giffords added that the recovery had been "difficult."

  • It's So Hard To Say Goodbye To Yesterday (Boyz II Men)

    <a href="http://www.huffingtonpost.com/2012/01/22/gabrielle-giffords-stepping-down_n_1222168.html" target="_hplink"><strong>(Jan. 22, 2012) --</strong></a> A little more than a year after the shooting, Giffords announced that she was leaving Congress. In a Facebook video, she cited her recovery as a primary concern, thanking her constituents for their support: "I don't remember much from that horrible day, but I will never forget the trust you placed in me to be your voice," Giffords said. (AP Photo/Office of Gabrielle Giffords)

  • I Can See Clearly Now (Johnny Nash)

    <a href="http://www.huffingtonpost.com/2012/01/24/gabrielle-giffords-last-bill_n_1229309.html" target="_hplink"><strong>(Jan. 24, 2012) --</strong></a> Two days before exiting Congress, Giffords unveiled her final bill, aimed at stopping cross-border drug smugglers. "Congresswoman Giffords is committed to taking this crucial step that would help secure the border against drug smugglers," Giffords' chief of staff, Pia Carusone, said in a statement. "That's why she decided this would be the last bill she introduces before she steps down." (Photo by Jonathan Gibby/Getty Images)

  • Hero (Mariah Carey)

    <a href="http://www.huffingtonpost.com/2012/01/25/gabrielle-giffords-state-of-the-union-appearance_n_1230480.html" target="_hplink"><strong>(Jan. 24, 2012) --</strong></a> Giffords made a moving appearance at Obama's 2012 State of the Union address. Her presence drew rousing applause, inspiring colleagues on both sides of the aisle. (Photo by Saul Loeb-Pool/Getty Images)