Dylann Roof, the white supremacist already sentenced to death in federal court for a 2015 massacre at a historic black church in South Carolina, has pleaded guilty to separate state murder charges, sparing relatives of the victims a second trial.
Roof, wearing a grey prison jumpsuit and shackled at the wrists and waist, stood in a state courtroom in Charleston and entered "guilty" pleas to the murders of nine African-Americans at Emanuel African Methodist Episcopal Church.
He also pleaded guilty in the attempted murder of three survivors.
Judge J C Nicholson then sentenced 23-year-old to nine consecutive life terms without possibility of parole, and three consecutive 30-year prison terms in the attempt to kill Felicia Sanders, her grandchild, and Polly Sheppard.
In January, Roof was sentenced to death after his conviction on 33 federal counts, including hate crimes and obstruction of religion.
"I think he should get death," said Eva Jackson Dilligard, sister of Susie Jackson, 87, who was shot 11 times.
"He hurt so many people," she said during Monday's court session.
"We don't need to see his face on TV every time they want to talk about him. I'm a child of God but he hurt the entire family."
State prosecutor Scarlett Wilson summarised what she called "mountains of evidence" against Roof that were presented in US District Court during the December trial.
On 17 June 2015, Roof walked into the first-floor fellowship hall of Emanuel African Methodist Episcopal Church and was welcomed to a Bible study session.
Toward the end of the meeting as the members closed their eyes in prayer, he took out his .45-caliber Glock pistol and began shooting at the 12 people there.
He shot the nine victims multiple times.
Joseph Roof, the shooter's grandfather and a longtime lawyer in Columbia, was the only person at court who spoke for his grandson.
"I will go to my grave not understanding what happened," he said. "I've lost a grandson that I loved very much ... I'd like to say loudly and repeatedly and constantly, we're sorry."
Authorities will likely transfer Roof to a federal penitentiary in Terre Haute, Indiana, to await execution. An appeal of his death sentence has not yet been filed.
Appeals in such cases can take a decade or more, the centre's executive director, Robert Dunham, said in a telephone interview.
Since 1988, when the federal death penalty was reinstated, 76 defendants in the United States have been sentenced to death and three prisoners have been executed, according to the centre's website. Dozens of others have been executed by states.
Roof will become the 62nd current federal death row inmate.