The FBI said Tuesday it had launched a domestic terrorism investigation into the shooting at a California festival on July 28 that left three dead and more than a dozen others injured.

Investigators say they found that the 19-year-old gunman had delved into “violent ideologies” and held a list of possible targets across the country, including religious institutions, political organizations linked to both major parties, federal buildings and courthouses, said John F. Bennett, special agent in charge of the FBI’s San Francisco office, at a news briefing Tuesday. He declined to identify them.

The gunfire at the Gilroy Garlic Festival, an event that draws tens of thousands of visitors annually, sent terrified visitors fleeing from a chaotic scene. Among the dead were two children.

About a week later, a pair of mass shootings — first in El Paso, then in Dayton, Ohio — unfolded just hours apart, leaving a combined 31 dead and dozens more injured. The FBI is involved in those investigations as well.

Authorities are investigating the El Paso shooting as domestic terrorism and a hate crime. They think the 21-year-old suspect, accused of opening fire in a shopping area near the border, wrote an online manifesto denigrating immigrants. The bureau has dispatched personnel from a domestic terrorism-hate crimes fusion cell as part of that probe.

In Dayton, where the shooter — identified as Connor Betts, 24 — targeted a nightlife area, officials were still exploring a motive. On Tuesday, the FBI and local police said they had learned that Betts was interested in “violent ideologies,” though Todd A. Wickerham, special agent in charge of the bureau’s Cincinnati office, declined to elaborate on what those were. He said the bureau would look at what ideology, if any, influenced the attacker.

The announcements in California and Ohio come amid renewed scrutiny of how the U.S. government treats violent ideologues. FBI officials have said recently they were conducting about 850 domestic terror investigations, with racial violence fueling a large share of such cases. Questions about the government’s handling of far-right attackers, in particular, have been especially sharp.

In Gilroy, law enforcement officials had said since the shooting that they did not know what could have motivated the attacker, identified as Santino William Legan. Legan, who was from the area, killed himself after exchanging gunfire with police, they said.

Those killed in California have been identified by authorities as Stephen Romero, 6; Keyla Allison Salazar, 13; and Trevor Deon Irby, 25.

Scot Smithee, the Gilroy police chief, said Tuesday that Legan was wearing a bullet-resistant vest and had extra ammunition during the attack. He fired about 39 rounds, Smithee said, and was struck multiple times by the officers who confronted him.

Investigators have not determined a motive for the shooting at the food festival, nor have they located a manifesto, Bennett said. He also said that although authorities have found indications of violent ideas, precisely what the attacker believed remains unclear.

“We have uncovered evidence throughout the course of our investigation that the shooter was exploring violent ideologies,” Bennett said. “We have seen a fractured ideology. The shooter appeared to have an interest in varying, competing violent ideologies.”

Bennett did not elaborate. He said investigators were still exploring Legan’s digital footprint to determine whether the attacker had settled on one particular ideology, whether he was in touch with anyone regarding these beliefs and who, if anyone, might have helped or had advance knowledge of his plans.

Bennett said a violent attack, even one on a large scale, “does not necessarily give us the legal authority to open a federal terrorism investigation.” Rather, he said, investigators have to find “the existence of ideological motivation” that fueled the violence.

Legan’s relatives released a statement on Tuesday saying they were “deeply shocked and horrified by the actions of our son.”

“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,” they said in the statement. “Our son is gone, and we will forever have unanswered questions as to how or why any of this has happened.”

Hannah Knowles contributed to this report.