Shortly before he opened fire, the white gunman accused of killing 10 Black people at a Buffalo, New York, supermarket allowed a small group of people to see his detailed plans for the attack, which he had been chronicling for months in a private, online diary.

Discord, the chat platform where 18-year-old Payton Gendron kept the diary, confirmed Wednesday that an invitation to access his private writings was sent to the group about a half-hour before Saturday's attack at Tops Friendly Market, which he live-streamed on another online service. Some of them accepted.

Gendron's diary and its racist, anti-Semitic entries dated to last November included step-by-step descriptions of his assault plans, a detailed account of a reconnaissance trip he made to Buffalo in March, and maps of the store that he drew by hand.

“What we know at this time is that a private, invite-only server was created by the suspect to serve as a personal diary chat log,” a Discord spokesperson said in a written statement. “Approximately 30 minutes prior to the attack, however, a small group of people were invited to and joined the server. Before that, our records indicate no other people saw the diary chat log in this private server.”

It wasn't clear if any of the people who accessed Gendron's diary or saw his livestream did anything to alert the authorities or attempt to stop the attack. Discord said it removed Gendron's diary as soon as the platform became aware of it, in accordance with the company's policies against violent extremism.

Buffalo Police Commissioner Joseph Gramaglia said Monday that investigators were working to obtain, verify and review Gendron's online postings.

Copies of his Discord diary - essentially a transcript of his postings to his private chat log - briefly surfaced elsewhere online after the shooting, along with a 180-page screed attributed to him. Both were laced with white supremacist beliefs echoing a baseless extremist conspiracy theory about a plot to diminish the influence of white people.

President Joe Biden, visiting Buffalo on Tuesday, repudiated such beliefs, saying: “Now's the time for people of all races, from every background, to speak up as a majority ... and reject white supremacy.”

Gendron was arraigned over the weekend on a murder charge; a not guilty plea was entered on his behalf and he remains jailed under a suicide watch. He is scheduled to appear in court in Buffalo again Thursday.

Tech companies like Discord and Twitch, which authorities say Gendron used to livestream the supermarket attack, are under scrutiny for their role as vectors of hate speech.

New York Gov. Kathy Hochul on Wednesday authorized the state's attorney general, Letitia James, to investigate social media platforms used by Gendron to determine if they have “civil or criminal liability for their role in promoting, facilitating, or providing a platform to plan and promote violence.”

Discord said it planned to cooperate with James' probe and is continuing to assist law enforcement in the ongoing investigation into the shooting.

“Our deepest sympathies are with the victims and their families,” the company said. “Hate has no place on Discord and we are committed to combating violence and extremism.”

Messages seeking comment were left with Twitch. Twitch CEO Emmett Shear told the Harvard Business Review in an interview earlier on Wednesday that the Amazon-owned platform would continue to “invest heavily in ensuring the safety of everyone on Twitch.”

“I think this is an example of one of those places where we've done a lot of work, but there is obviously still work to be done,” Shear said.

Attempts to reach representatives of two other tech platforms James is investigating, 8kun and 4chan, were unsuccessful. Gendron wrote in his diary that those boards were where he started reading up on the racist ideologies that set him on a path to killing nonwhite, non-Christian people.

When reached for comment, Ron Watkins, the longtime administrator of 8kun and its predecessor, 8chan, said he resigned from the organization last year and has “no idea what's going on with that.”

Gendron wrote in his Discord diary that he started reading 4chan a few months into the COVID-19 pandemic in 2020 and that he was heavily influenced by Brenton Tarrant, who killed 51 people in a shooting rampage at two mosques in Christchurch, New Zealand, in 2019. Gendron wrote that he originally planned his attack for March 15, the three-year anniversary of Tarrant's attack.

Copies of Gendron's diary postings were shared with The Associated Press by Marc-Andre Argentino, a research fellow at the London-based International Centre for the Study of Radicalisation and Political Violence. He said it was possible but unlikely the diary could have been altered by someone other than the author.

Gendron, in the diary, said he specifically targeted a store with a predominantly Black clientele, researching spots in Rochester, Syracuse and on Long Island before settling on Buffalo. Prosecutors say he showed up Saturday wearing body armor and armed with an AR-15-style rifle as a helmet-mounted camera streamed to the internet.

Problems with his gun and then a bout with COVID-19 - which he theorized he contracted from a fast-food chicken sandwich poisoned by government agents - prevented him from attacking earlier, he wrote in the diary.

Gendron wrote that he started thinking about “a personal attack against the replacers” a few weeks prior to an episode in a high school class about a year ago. That episode led to him being taken to a hospital for a psychiatric evaluation.

A few weeks before the attack, Gendron wrote that neither his parents nor his brothers were aware of his plans, but that he feared they would find out.

Sisak reported from New York. Associated Press reporters Haleluya Hadero in New York, Michael Balsamo and Eric Tucker in Washington, D.C., and Carolyn Thompson in Buffalo, New York, contributed to this report.