The FBI said its top official traveled to Charleston on Friday to meet with community leaders and with law enforcement officials who responded to and are investigating the Emanuel AME Church shootings.

Director James Comey’s visit was disclosed after his visit.

“I grieve with the families of the loved ones lost,” Comey said in a written statement. “The FBI will continue to work tirelessly to prevent these types of violent acts so other communities will be spared the same heartbreak that the good people of Charleston have endured.”

Dylann Roof, 21, was indicted this week for the murders of nine people at the historic black church on Calhoun Street during a Bible study in June. The 33 federal charges include allegations of 13 hate crimes. Roof, who is white, previously was indicted on homicide charges at the state level.

The FBI has said that a failure in the background-check process enabled Roof to buy a .45-caliber handgun. Earlier this week, Comey called that a “mistake of heart-breaking importance,” according to media reports.

The FBI said Comey and Dave Thomas, special agent in charge of the bureau’s Columbia office, met with unidentified community leaders and with federal, state and local law enforcement partners working on the case. It did not release any other details about Comey’s visit.