Payton Gendron, 19, had pleaded guilty to a state charge of domestic terrorism motivated by hate over the massacre in Buffalo in May, which carries a mandatory penalty of life without parole.
The convicted teen, who told the court he was "very sorry" for his actions, still faces dozens of federal hate crime charges that could see him receive the death penalty.
Gendron had to be escorted out of the courtroom when an audience member rushed at him during emotional statements by relatives of victims.
The man was restrained and the hearing resumed several minutes later.
Earlier, Simone Crawley, the granddaughter of 86-year-old Ruth Whitfield, called Gendron "a cowardly racist."
Kimberly Salter, the widow of security guard Aaron Salter, explained why her family were wearing red and black.
"Red for the blood that he shed for his family and for his community, and black because we are still grieving," she said.
Gendron planned the attack for months, targeting Tops Friendly Market in Buffalo because of the large African-American population in the surrounding neighborhood.
On May 14, the then-18-year-old drove from his hometown of Conklin, more than 322 kilometers away, with the intention of killing as many Black people as possible, prosecutors said.
Wearing heavy body armor and wielding an AR-15 assault rifle, he shot four people in the store's parking lot, three of them fatally, before entering the grocery store.
Among those killed inside was a retired police officer working as a security guard. He fired several shots at the assailant before being shot and killed himself, police said.
Gendron wore a helmet with a video camera attached and live-streamed the two-minute attack on the platform Twitch.
The victims ranged in age from 32 to 86. Eleven of the 13 people shot were Black and two were white.
Police arrested Gendron within hours of the attack and investigators found a 180-page document on his computer that laid out his racist motivations for the massacre.
He had made references to the "great replacement theory," a conspiracy premise on the far-right that claims people of color are being brought into the United States to replace white Americans.
Gendron admitted all the charges against him in November, including 10 counts of murder in the first degree, three attempted murder charges and one count of criminal possession of a weapon.
He was the first person in New York to be convicted of the state's domestic terrorism charge, which was introduced in 2020.
A white supremacist who murdered 10 Black people during a live-streamed supermarket rampage in New York state last year was sentenced to life in prison Wednesday during an emotional hearing that saw a man lunge for the shooter.
NEW YORK —