(BUFFALO, N.Y.) — Federal hate crime charges were announced against the Buffalo mass shooting suspect as Attorney General Merrick Garland arrived in the city Wednesday to meet with survivors and the families of the 10 victims.

Payton Gendron, 18, is accused of storming aTops grocery store on May 14 and gunning down 10 people, all of whom were Black, in an alleged hate crime.

At one point Gendron aimed his Bushmaster XM rifle at a white Tops employee, who was shot in the leg and injured. Gendron allegedly apologized to him before continuing the attack, Garland said at a news conference.

Gendron allegedly planned the massacre for months, including driving to the store to sketch the layout and count the number of Black people present, Garland said.

Federal prosecutors charged Gendron with a total of 26 counts of committing a hate crime resulting in death and a hate crime involving bodily injury. He’s also charged with using a firearm to commit murder during a crime of violence.

Gendron was allegedly motivated by the racist, far-right conspiracy theory known as the replacement theory and he wanted to “inspire others to commit similar attacks,” the complaint said. Markings on the rifle used in the shooting including the phrases “here’s your reparations” and “the great replacement,” the complaint said.

Garland said the Justice Department agrees with President Joe Biden that “18-year-olds should not be able to purchase a gun like this,” referring to the semi-automatic rifle used in the massacre.

Assistant Attorney General for Civil Rights Kristen Clarke, who appeared at the news conference with Garland, added, “The Civil Rights division and the entire Justice Department will not stand by idly in the fight against white suprematist violence.” She promised, “We will pursue the perpetrators of hate crimes and hold them accountable.”

The Justice Department is also “hard at work addressing non-criminal acts of bias that rear their ugly head inside our schools, workplaces and our neighborhoods,” Clarke said, as well as addressing how to prevent hate crimes through education and awareness.

The Buffalo massacre could inspire more racially motivated attacks in the coming months, the Department of Homeland Security warned in a new report released this week.

Other charges against Gendron include 10 counts of first-degree murder and 10 counts of second-degree murder as a hate crime. The teen is the first person in state history to be charged with domestic terrorism motivated by hate. Gendron’s lawyers entered a plea of not guilty to the state charges on his behalf.

ABC News’ Alex Mallin and Aaron Katersky contributed to this report.

Copyright © 2022, ABC Audio. All rights reserved.