SALINAS, Calif. - The FBI is opening a domestic terrorism investigation into the shooting that killed three people and injured 13 others at a popular California food festival.

The gunman killed three people, two of them children, and wounded 13 others with a Romanian-made AK-47 variant rifle at the festival before turning the gun on himself.

Describing the shooter's ideology as "fractured," John Bennett said the FBI was continuing to dig through his online presence.

"He appeared to have an interest in variant, competing, violent ideologies," Bennett said.

The FBI continues to investigate who, if anyone, the gunman was communicating with about these ideologies, if anyone helped him plan the attack or if anyone had advance knowledge of the attack.

Mass shootings and misogyny:The violent ideology we can't ignore

No universal definition of terrorism exists, even just within the United States. But a commonly used one is in Title 22 of the U.S. Code, where terrorism is defined as "premeditated, politically motivated violence perpetrated against non-combatant targets by subnational groups or clandestine agents."

The politically motivated aspect is the hardest to prove in mass shooting cases, according to Fait Muedini, an international studies professor at Butler University. Because the El Paso shooter may have left behind evidence of his ideological-motivated violence, it is easier to label as terrorism, Muedini said.

Bennett offered his condolences to the families as well as the community.

"I know nothing we say or do can ever bring back your loved ones but I want you to know that...everything is being done with you in our minds. We are very sorry for your loss," he said.

Domestic terrorism, hate crime or both? In the wake of two more hate-fueled mass shootings, when do we call it domestic terrorism?

Opinion:Gilroy shooting victim attended my school. Soon, we'll all have a connection to violence.

Gilroy Police Chief Scot Smithee said police fired 18 rounds at the gunman; the shooter fired 49. The assailant had five 40-round magazines on or near him at the time of the shooting, as well as a Remington 870 shotgun in his car.

A bag near the creek belonging to the shooter contained two loose rounds for the rifle that he had and a rifle scope. It also contained a flashlight, a shovel, two additional loaded 40-round magazines for the gun and four loose buckshot rounds for the shotgun.

None of the victims killed at the festival were killed by friendly fire, Smithee said.

The case is ongoing, Bennett said.

"'Gilroy Strong' is not just a t-shirt. It is who you are. This community is incredible," said Bennett.

A separate shooting that killed 22 people at a crowded El Paso, Texas, store over the weekend is also being handled as a domestic terrorism case.

Brian Levin, director of Cal State San Bernardino’s Center for the Study of Hate and Extremism, said hate crimes and terrorism are increasingly intertwining as the U.S. becomes more politically polarized.

In July, FBI Director Christopher Wray told the Senate Judiciary Committee that the majority of domestic terrorism cases the bureau investigates are motivated by white supremacy.

Coroner's office:6-year-old boy killed at Gilroy Garlic Festival shot in the back

Dayton, El Paso, Gilroy and beyond:You're right to be afraid. Mass shootings are more numerous and deadly

These racist beliefs tend to be behind recent major acts of violence, such as the October 2018 Tree of Life synagogue shooting and the August 2017 Charlottesville, Virginia, car attack. At the Tree of Life shooting, 11 people were killed, and in Charlottesville, one person was killed.

Levin pointed out, though, that the motives behind perpetrators of mass shootings are becoming harder to categorize. Most shooters aren't part of organizations with a straightforward ideology or mission, which is a characteristic generally associated with terrorism, he said. These people form their own "idiosyncratic type of extremism," Levin said.

Contributing: The Associated Press. Follow Kate Cimini on Twitter: @k_cimini