By the Associated Press

A gunman cut through a fence at a popular California garlic festival and turned to a tent where the Honey Ladies were selling their habanero and garlic honey. He shot and wounded the business owner and her husband, but thanks to a 10-year-old girl, their young son escaped harm, witnesses say.

Candice Marquez and another woman had stepped away from the stand they were working Sunday with her boss, Wendy Towner, and Towner’s husband, Francisco. She heard what she thought were fireworks, then saw a gunman heading toward their tent.

“We were the only ones right there. He had a straight shot for both of us. I’ve never been so scared,” Marquez told The Associated Press.

More terrifying, children were still in the tent. But Marquez said her niece sprang into action, dragging her boss’ 3-year-old son out of harm’s way.

“She was brave. She grabbed him and put him under a table,” she said.

Troy Towner wrote on a fundraising page he set up for his sister that the girl’s actions probably saved his nephew’s life.

It’s one of the stories of heroism that emerged from the violence that tore through the last day of the Gilroy Garlic Festival, leaving a 6-year-old boy, a 13-year-old girl and a young man from New York dead.

As the gunfire erupted Sunday, 13-year-old Keyla Salazar stayed back to keep pace with a relative who uses a cane. The girl was hit.

“If Keyla hadn’t been there, her stepfather’s mother would have been shot,” said her aunt Katiuska Vargas.

Keyla’s stepfather also was shot and wounded as he went back for her, Vargas said.

Her aunt described Keyla as a hardworking student who loved drawing and video games and wanted to become an animator.

The Northern California community of Gilroy known for growing garlic and celebrating the prized, pungent crop at one of the largest food fairs in the United States is rallying around the victims — and each other. They vowed at a vigil Monday not to let 19-year-old gunman Santino William Legan tear them down.

Authorities were searching Tuesday for Legan’s motive, including combing his social media, where he posted just before the shooting. They say he appeared to fire at random and that police patrolling the event responded within a minute and killed Legan as he turned the weapon on them.

On the day of the attack, Legan urged his Instagram followers to read a 19th century book popular with white supremacists on extremist websites. He also complained about overcrowding towns and paving open space to make room for “hordes” of Latinos and Silicon Valley whites.

Legan posted a photo from the festival minutes before opening fire, saying, “Come get wasted on overpriced” items. His since-deleted Instagram account says he is Italian and Iranian.

He legally purchased a military-style rifle this month in Nevada, where he had been staying recently. Officials seized from an apartment empty shotgun and rifle boxes, a gas mask, empty ammunition boxes, electronic devices, pamphlets on guns and a sack full of ammunition casings, prosecutors said Tuesday.

Under a California law that went into effect Jan. 1, residents younger than 21 are barred from buying rifles or shotguns unless they are in the military or law enforcement. Those 18 and up can buy rifles in Nevada.

Big Mikes Gun and Ammo, which appears to be a home-based internet gun shop in Fallon, Nevada, said on Facebook that Legan ordered the rifle off its website and “was acting happy and showed no reasons for concern” when the store owner met him.

The shooting sent people running away in terror and diving under tables and a concert stage. Five wounded people ranging from 12 to 69 were still in hospitals, San Francisco Bay Area station KTVU reported Tuesday.

The youngest victim, Stephen Romero, described by his grandmother as a kind, happy and playful kid, had just celebrated his sixth birthday in June at Legoland in Southern California.

The oldest victim was Trevor Irby, 25, who graduated in 2017 from Keuka College in upstate New York and was described as an athlete and Pittsburgh Steelers fan. He was there with his girlfriend, who wasn’t hurt.

People had to pass through metal detectors and have their bags searched at the long-running festival that draws more than 100,000 people with music, food booths and cooking classes to the city roughly 80 miles (176 kilometers) southeast of San Francisco. Police, paramedics and firefighters were stationed throughout the event.

Legan bypassed those security measures by cutting through a fence, Gilroy Police Chief Scot Smithee said.

That’s when Wendy Towner saw him and yelled: “No, you can’t do that!” Troy Towner wrote.

The gunman turned toward her tent, shooting her in the leg and her husband three times, Troy Towner wrote on the fundraising page. He said his sister underwent surgery and was expected to have long-term nerve damage, while her husband faces many surgeries.

Towner said his nephew was OK and staying with family. He updated the page Tuesday to say the boy saw his mother in the hospital and his father by video chat.