The FBI is opening a domestic terrorism investigation into the shooting that killed three people at a popular California food festival last week.

Authorities said in a Tuesday press conference that the gunman had a “target list” that included religious groups, US buildings and both political parties. The festival was also listed as a target.

Nineteen-year-old Santino William Legan fatally shot three people, including two children, as the garlic festival in Gilroy was coming to an end on 28 July. Thirteen others were injured. Legan turned the gun on himself after being engaged by police officers.

John Bennett, the FBI’s agent in charge in San Francisco, says authorities still had not determined a motive and Legan appeared to be interested in conflicting ideologies.

Investigators were examining Legan’s digital media to determine his possible views, whom he may have been in contact with, who, if anyone, helped him and why he committed the violence, Bennett said.

The list, which also included federal buildings and both major US political parties, was found during the examination of the digital evidence. Bennett said the groups included were being notified but the FBI would not release their names.

Also on Tuesday, mourners packed a church in nearby San Jose for the funeral of one of the victims in the shooting.

Before the service, friends and family members used colored markers to write messages on the casket of Keyla Salazar, two days after the girl would have turned 14.

One read: “Keyla, you’re an angel. We will never forget you!”

Relatives wore T-shirts with a photo of a smiling Keyla with a crown of small pink paper flowers.

Federal investigators have fewer tools and legal powers at their disposal in domestic terrorism cases than they do if they are up against someone tied to an international organization such as Isis or al-Qaida.

Law enforcement officials conducting international terrorism investigations, for instance, can get a secret surveillance warrant to monitor the communications of a person they think may be an agent of a foreign power or terror group.

The US criminal code also makes it a crime for anyone to lend material support to designated foreign terror organizations, even if the investigation doesn’t involve accusations of violence.

There is no domestic counterpart to that material support statute, meaning federal prosecutors must rely on hate crime laws, weapons charges and other approaches that may not carry the terrorism label. Mere membership in or support for a white supremacist organization is not illegal.

Authorities said Tuesday that Legan fired 39 rounds before he killed himself. Three officers fired 18 times at him.

None of the victims who died were struck by officers’ fire, the Gilroy police chief, Scot Smithee, said.

Legan was wearing a bullet-resistant vest and had multiple magazines on his body and on the ground, the chief said.

Authorities also said they found more ammunition, a rifle scope, flashlight and shovel in a bag in a nearby creek.