LOS ANGELES — Federal authorities have launched a domestic terrorism investigation into the shooting at the Gilroy Garlic Festival after officials discovered the gunman had a list of other potential targets, authorities said at a news conference Tuesday.

John F. Bennett, FBI special agent in charge, said the garlic festival was one of several potential targets listed. Others included religious organizations, courthouses, federal buildings and political institutions involving both the Republican and Democratic parties. He declined to provide specifics on the targets but said law enforcement officials were reaching out to notify them.

Santino William Legan, 19, opened fire at the popular Northern California food festival on the evening of July 28, killing three people and wounding 13 more. Legan wore a bulletproof vest as he carried out the attack, firing 39 rounds as attendees fled from the park where the annual festival was being held, said Gilroy Police Chief Scot Smithee.

Police initially said the rampage was cut short when three Gilroy police officers engaged a rifle-wielding Legan with handguns and killed him in less than a minute. Officers fired 18 rounds at Legan and hit him multiple times, but those wounds were not fatal, officials later said.

The county medical examiner concluded Friday that Legan killed himself, contradicting that earlier police account.

The announcement of a domestic terrorism probe in the Gilroy shooting comes days after mass shootings at a Walmart in El Paso, Texas, that killed 22 people and one in Dayton, Ohio, that killed nine.

Authorities are continuing to try to determine a motive for the attack in Gilroy and investigate Legan’s background. Authorities have not determined whether he was a white nationalist, but they have not ruled it out either, Bennett said.

“We have uncovered evidence that the shooter was exploring violent ideologies,” he said. On Thursday, the agent had noted that written materials taken from Legan’s residence in Nevada ran the ideological gamut.

Researchers are increasingly seeing shooters with a broad range of incentives and, at times, conflicting ideologies, which can make it difficult to classify attacks and pinpoint motivations, said Brian Levin, director of California State University, San Bernardino’s Center for the Study of Hate and Extremism.

He added that some are motivated to unleash chaos and violence in the hopes that a society they believe doesn’t recognize them will disintegrate.

“We see that in the far right, but we also see it in anarchists,” Levin said. “Traditionally, what we’ve seen is some kind of curation about where aggression is directed, but there’s a whole cadre of extremists whose goal is really about bringing society to its knees. Violence is not just a means to promote an ideology. It’s become an ideology itself.”

Authorities are trying to determine whom Legan may have been in contact with before the attack, whether anyone helped coordinate it and why he ultimately carried it out, Bennett said.

FBI profilers are interviewing Legan’s relatives and associates, reviewing his online presence and combing through materials seized from the Nevada residence, which include several hard drives, a computer tower, books and a letter from a relative, according to a receipt of a search warrant released by Nevada authorities.

Authorities say Legan bought the semiautomatic rifle used in the shooting legally in Nevada on July 9, less than three weeks before the shooting. The weapon looks like a military-style AK-47. With its standard clip and stocks, it’s considered an assault rifle that is banned under California law.

Legan had a 75-round drum magazine and five 40-round magazines as he carried out the attack. Authorities later found a Remington 870 shotgun inside his car, Smithee said.

Bennett has said there was no indication Legan targeted festival attendees of a particular race. Shortly before the attack, he promoted on Instagram a 19th-century screed often championed by white supremacists, and used a slur to refer to mixed-race people. Legan, whose family lives in Gilroy, identified himself on Instagram as of Italian and Iranian heritage.

California_Festival_Shooting_12924

This screenshot of Santino William Legan’s Instagram account shows a selfie of Legan, who opened fire with an “assault-type rifle” on July 28 at the Gilroy Garlic Festival in Gilroy, Calif., killing three. Instagram via AP

Legan’s shooting rampage killed Stephen Romero, 6, Keyla Salazar, 13, and Trevor Irby, 25.

Legan’s family wrote in a statement that they are “deeply shocked and horrified” by their son’s actions. They thanked the community for their messages of support and compassion.

“To the families of Stephen Romero, Keyla Salazar, Trevor Irby, and to the injured that survived this tragedy, we cannot begin to describe our despair at his actions. We want to express our deepest and sincerest apologies for the loss and pain that he has caused,” the statement read.

“We have never and would never condone the hateful thoughts and ideologies that led to this event, and it is impossible to reconcile this with the son we thought we knew. Our son is gone, and we will forever have unanswered questions as to how or why any of this has happened.”