In a rambling 180-page document shared online, Gendron declared himself a white supremacist, called his planned rampage terrorism and expressed a desire for it to incite more violence.
After the attack, which he live-streamed, the gunman surrendered, police said, and was charged with first-degree murder. The suspect has pleaded not guilty.
Authorities said a grand jury investigation was ongoing, and that the shooting appeared to be a hate crime fueled by racism. Federal authorities are also investigating the shooting as a hate crime and have not filed charges.
A grand jury considering the case against Gendron returned one count of domestic terrorism motivated by hate, 10 counts of first-degree murder as a hate crime, 10 counts of second-degree murder as a hate crime, three counts of attempted second-degree murder as a hate crime and one count of second-degree criminal possession of a weapon.
If convicted of domestic terrorism motivated by hate, Gendron would face an automatic sentence of life in prison without parole.
Gendron is scheduled to be arraigned on the charges Thursday afternoon. His attorney, Daniel Dubois, and John Flynn, the Erie County district attorney, declined to comment before the court appearance.
The shooting shook Buffalo and reverberated across the country, the latest in a string of attacks in which officials say alleged or convicted gunmen were motivated by bigotry. When President Biden spoke in Buffalo three days after the killings, he invoked the sites of some of those other massacres, including El Paso, Pittsburgh and Charleston, S.C. Ten days after the massacre in Buffalo, a gunman fatally shot 19 students and two teachers at a Texas elementary school.
After the Buffalo shooting, details emerged suggesting extensive planning before Gendron drove about three hours from his home in Conklin, N.Y., to Buffalo, investigators said. The Washington Post has reviewed hundreds of pages of messages posted online by a writer who identified himself as Gendron, and they included details about plans to kill Black people.
Those messages also included mentions of a decision in February to target the Tops grocery store in Buffalo because of the communitys robust Black population; a March trip to the store to assess its security; and plans to attack other nearby locations.
Police in Buffalo have said Gendron was in the city in March. They also said investigators believe he planned to continue killing Black people after the grocery store attack.
Gendron kept his plans from his family, he wrote, amassing weapons and gear that he hid. During the attack, Gendron was allegedly wearing tactical gear and wielding an assault weapon that appeared to display a racial slur.
Shortly before the shooting, he sent an invitation to Discord users to join a chatroom to view the live stream. Fifteen people accepted the invitation.