The white man charged with murdering 10 black people at a supermarket in Buffalo appeared briefly in court on Thursday after a grand jury indicted him on a first-degree murder charge.
Assistant District Attorney Gary Hackbush said the indictment of Payton Gendron, 18, was handed up on Wednesday.
Mr Gendron, wearing an orange jail uniform and a mask, was silent throughout the one-minute proceeding attended by some relatives of the victims.
Someone shouted, “Payton, you’re a coward”, as he was led out.
He is being held in jail without bail.
In New York, prosecutors can charge a person with first-degree murder only under special circumstances, including when several people are killed in a single incident, such as the Buffalo shooting. The single count against Mr Gendron covers all 10 deaths at the supermarket.
Mr Gendron's court-appointed lawyer entered a plea of “not guilty” on his behalf at a court appearance last week. He is scheduled to return to court on June 9.
Thirteen people were shot at the Tops Friendly Market in Buffalo on Saturday. Police are investigating the possibilities of terrorism and hate crime charges.
All 10 of those who were killed in the supermarket shooting were black.
Mr Gendron also “planned to attack more than one store” if he had escaped the scene, said the Buffalo police commissioner.
Shortly before the attack, Mr Gendron reportedly posted a 180-page racist diatribe that contained specific plans to attack black people, citing a conspiracy that white people are being “replaced”.
The suspect kept his diary in the online platform Discord, which on Wednesday confirmed that an invitation to gain access to it was sent to a handful of people 30 minutes before the shooting began.
Mr Gendron then live-streamed the rampage. It is unknown whether anyone attempted to contact law enforcement.
New York Governor Kathy Hochul on Wednesday authorised the state's attorney general, Letitia James, to investigate social media platforms used by Mr Gendron to determine if they were liable for “providing a platform to plan and promote violence”.
The Associated Press contributed to this report