(CNN) Details continue to emerge about the May 14 shooting at a Buffalo, New York, supermarket and the 18-year-old who authorities say is responsible.
Thirteen people -- 11 of whom are African American -- were shot, according to city officials, who have said the massacre was racially motivated, pointing in part to racist writing purportedly by the suspect. Ten were killed, while three victims suffered non-life-threatening injuries.
The suspect -- identified as Payton S. Gendron, an 18-year-old White man -- surrendered to police. He pleaded not guilty to a charge of first-degree murder later that day, per Buffalo City Court Chief Judge Craig Hannah. Erie County District Attorney John Flynn said he expected to file additional charges.
On June 1, a grand jury returned a 25 count indictment against Gendron. He is facing 10 counts of first-degree murder, 10 counts of second-degree murder as a hate crime and three counts of attempted murder as a hate crime, according to court documents. Gendron is also facing a charge of domestic terror and a weapons charge, court documents state.
Gendron pleaded not guilty to the indictment, his attorney said in court Thursday afternoon.
The FBI is investigating the shooting as both a hate crime and a case of racially motivated violent extremism, said Stephen Belongia, FBI special agent in charge of the Buffalo field office.
Federal prosecutors are also working to bring charges against Gendron, law enforcement officials say.
Here's what we know about the shooting and the investigation.
When the suspect arrived at the Tops Friendly Markets on Jefferson Avenue about 2:30 p.m., he was "very heavily armed," according to Buffalo Police Commissioner Joseph Gramaglia.
"He had tactical gear, he had a tactical helmet on, he had a camera that he was livestreaming what he was doing."
The suspect first opened fire in the store's parking lot, authorities said, shooting four people. Three of those people died, Gramaglia said.
The suspect went inside the store and began shooting customers, police said. A security guard inside the store who was a retired Buffalo police officer shot the suspect. But because the suspect wore heavy armor, the bullets did not have any effect, Gramaglia said.
The suspect shot and killed the security guard and continued working his way through the store, the commissioner said. When police arrived, the suspect put his gun to his neck but later dropped the gun and took off some of his gear, he added.
He surrendered and was transported to Buffalo police headquarters.
During his arrest, the suspect made very disturbing statements describing his motive and state of mind following his arrest, according to an official familiar with the investigation. The alleged shooter made it known he was targeting the Black community during the statements, according to the official.
Warrants are being obtained for suspect's home, vehicle, social media platforms, computer, telephone, and any other digital technologies, Gramaglia said. The investigation shows Gendron acted on his own in the shooting, he added.
Of the 13 people shot, 11 are African American and two are White, said Gramaglia.
Four were store employees, he said. Three suffered "nonfatal wounds," he said. The fourth, security guard Aaron Salter, a retired Buffalo police lieutenant, was killed as he tried to stop the suspect. Mayor Byron Brown called him a "hero, who tried to protect people in the store, tried to save lives, and in the process, lost his own life."
Police identified the victims, ranging in age from 20 to 85.
Among them was 62-year-old Geraldine Talley, who was shopping with her fiancé when gunfire erupted, her niece, Lakesha Chapman, said. Talley was at the front of the store, Chapman said, but her fiancé had gone to get orange juice. He escaped unharmed.
Chapman's "Auntie Gerri" was always "the life of the party," she said. "She was just a lover. I mean she didn't meet a stranger, and that's why this hurts so much," said Chapman.
Heyward Patterson, a 67-year-old taxi driver, was waiting for passengers outside the supermarket when he was gunned down, according to his nephew, Terrell Clark.
Patterson -- who loved to tell jokes and sing at church -- "took pride in helping people," Clark said. "And if the person had little or no money, he would still give them a ride. He had a big heart."
Livestreaming platform Twitch confirmed the suspect used its platform to stream a live broadcast during the attack, saying in a statement the video was removed less than two minutes after the violence began.
CNN obtained a portion of the livestream showing the alleged shooter pulling up to a Tops store.
The video is recorded from the point of view of the alleged shooter as he is driving into the supermarket's parking lot. The person is seen in the rearview mirror wearing a helmet and is heard saying, "Just got to go for it," before he pulls into the front of the store.
In the video, store patrons can be seen walking through the parking lot as the suspect drives up.
The company was "devastated" to hear about the shooting, it said, and the user "has been indefinitely suspended from our service, and we are taking all appropriate action, including monitoring for any accounts rebroadcasting this content."
Authorities at the state, local and federal level continue to investigate the shooting and motive, but they have already said they believe it was racially motivated.
"The evidence that we have uncovered so far makes no mistake that this is an absolute racist hate crime. It will be prosecuted as a hate crime," Gramaglia said. "This is someone who has hate in their heart, soul and mind."
Garcia, the Erie County sheriff, similarly said the shooting was a "straight up racially motivated hate crime from somebody outside of our community," describing it as "pure evil."
One piece of evidence may be a 180-page document purportedly written by the suspect and posted online before the shooting. The document, independently obtained by CNN shortly after the massacre and before authorities released the name of the suspect, is allegedly written by a person claiming to be Payton Gendron confessing to the attack.
The author attributes the internet for most of his beliefs, describes himself as a fascist, a white supremacist and an anti-Semite.
The suspect allegedly says he bought ammunition for some time but did not get serious about planning the attack until January. The author also writes about his perceptions of the dwindling size of the white population and claims of ethnic and cultural replacement of whites.
Alongside tirades about his false belief that White Americans were being "replaced" by people of other races, the document included pages upon pages listing the equipment and clothing he planned to wear, from military-style body armor down to the brand of his underwear.
The document also included a minute-by-minute outline of the suspect's plan. The author drew a color-coded map of the interior of the store, laying out how he planned to "shoot all black people." It's unclear how closely the gunman's attack followed the plan listed in the document.
When asked during a news conference why authorities are calling the mass shooting a hate crime, Flynn, the district attorney, said investigators have "certain pieces of evidence" that "indicate some racial animosity."
Further investigation also revealed Gendron made a "generalized threat" while he attended Susquehanna Valley Central High School in June 2021, Gramaglia said.
The suspect was visited last year by New York State Police after he did a high school project about murder-suicides, Garcia said.
According to Garcia, concerns about alleged mental health issues "were brought to light" after he turned in the post-graduation project.
"The state police arrived at his house at that point last year," Garcia said. "He stayed at a facility -- I'm not sure if it was a hospital or a mental health facility -- for a day and a half."
The suspect planned to continue his shooting rampage beyond the supermarket, Gramaglia told CNN, saying there was "some documentation" he allegedly planned to target "another large superstore."
The suspect visited the supermarket in early March and then the day before the shooting to gather information, "basically doing reconnaissance on the area," Gramaglia said.
Writings posted to social media by Gendron and analyzed by CNN reveal that the suspect visited Tops Friendly Market spent months extensively planning his attack.
The posts were originally posted to Discord and were later shared on the hate-filled online forum 4Chan.
According to his posts, Gendron drove from his home to the Buffalo supermarket March 8.
He adds that he was pulled over on his way to Buffalo at 10:17 a.m. for speeding on State Route 36, "going 64 in a 40."
Gendron writes that he went into the Tops Market three times -- at 12 p.m., 2 p.m. and again at 4 p.m -- and each time he details what is happening in the market. He notes how many Black and White people are present and provides a hand-drawn map of the market with marked aisles and exit points.
During his last visit to the supermarket at 4 p.m., Gendron says he is approached by a "Black armed security guard" who asked him what he is doing going in and out of the store. The suspect says he told the security guard that he was collecting "consensus data," for which the security guard said he needed to talk to the manager.
"I asked for his name and he told me and I instantly forgot, then I said bye and thanks and walked back to my car," Gendron writes. "In hindsight that was a close call."
In a March 10 post, Gendron writes, "I'm going to have to kill that security guard at Tops I hope he doesn't kill me or even hurt me instantly."
The shooter writes that he planned his attack for March 15 but then delays the date several times.
Gendron cites online research in choosing Buffalo as his site of attack, saying that the 14208 zip code in Buffalo has a higher Black population than the other locations he was considering. He also says he considered attacking a church or an elementary school, but chose the market because of how many people frequent grocery stores.
He refers to the Google popular times graph for Tops Friendly Market in determining the time of his attack when the store would be the busiest.
In the document, the suspect allegedly detailed how he had been radicalized by reading online message boards, while describing the attack as terrorism and himself as a White supremacist.
He wrote he had "moved farther to the right" politically over the last three years.
The suspect started browsing the message board 4chan -- a hotbed for racist, sexist and White nationalist content -- in May 2020 "after extreme boredom" during the early days of the coronavirus pandemic, according to the document. Posts he had read on the site made him believe "the White race is dying out," among other racist beliefs, and led him down a rabbit hole to other extremist websites, the document states.
The conspiracy theory of a "great replacement" has been a motivator of other violent attacks, experts in extremism have said. Some forms of the theory have more recently gone mainstream in conservative news outlets and politicians.
One day while browsing 4chan, the suspect allegedly saw a video clip of the gunman who killed 51 people in New Zealand at two mosques in 2019, according to the document. That livestream "started everything you see here," the document states.
In addition to the New Zealand massacre, the suspect was allegedly inspired by other racist mass shooters, including Dylann Roof, the gunman who killed nine Black people at a Charleston, South Carolina, church in 2015, and the assailant who killed 77 people in Norway in 2011, according to the document.
The document includes dozens of pages of racist and anti-Semitic screeds, including some language that appears to be copied from the New Zealand shooter's own writings.