Loughner also pleaded guilty to the attempted murders of federal employees and congressional aides Ronald S. Barber, 65, and Pamela K. Simon, 63, prosecutors said.
Loughner also admitted causing the deaths of Christina-Taylor Green, 9; Dorothy "Dot" J. Morris, 76; Phyllis C. Schneck, 79; and Dorwan C. Stoddard, 76, prosecutors said.
Prosecutors said Loughner admitted injuring with a Glock pistol 10 people participating at an activity provided by the U.S. government and creating a grave risk of death to 13 more people.
Prosecutors agreed to the plea deal after taking into account Loughner's history of mental illness and the views of victims and their families. The judge in August ruled Loughner competent to stand trial.