At a hearing at Erie County Court, Payton Gendron, 19, pleaded guilty to 25 counts related to the shooting, which also left three people wounded. In June, he initially pleaded not guilty after a grand jury returned an indictment.

Gendron, from Conklin, New York, was charged with 10 counts of first-degree murder and 10 counts of second-degree murder, all of them as hate crimes.

The grand jury indictment, which included a charge of domestic terrorism motivated by hate, accused Gendron of carrying out the attack based on the perceived race of his victims.

He faces a sentence of life in prison without parole. New York does not have a death penalty.

Gendron, who was 18 at the time of the shooting, drove three hours from his home near Binghamton, New York, to the Tops Friendly Markets store in Buffalo, authorities said. He was looking for a public location in an area where many Black people lived.

At the supermarket, he shot 13 people with a semi-automatic, assault-style rifle. Eleven of the victims were Black.

Police say he left a racist manifesto online before the attack and live-streamed the shooting on social media.

Terrence Connors, an attorney for relatives of seven of the dead and two surviving victims, said earlier that Gendron had no plea agreement with prosecutors.

A sentencing hearing is expected at a later date.

A separate indictment returned in U.S. District Court in July charged Gendron with 27 federal hate crimes and firearms offenses, for which he could face the death penalty if convicted.

(Reporting by Rich McKay in Atlanta; Editing by Lisa Shumaker)

By Rich McKay