Authorities said they believe Legan cut a fence to get into the festival and opened fire on a crowd around 5:40 p.m. Three people, identified as a 6-year-old boy, a 13-year-old girl and a man in his 20s, were killed in the shooting.

Officers patrolling the festival were quick to arrive on the scene and returned fire on Legan about a minute after the shooting started, according to police. He was killed by three responding officers, authorities said.

Here's what we know about Legan:

Legan was from Gilroy but lived in Nevada for a time before returning to his hometown.

Police said Monday that they were still investigating the timeline of his moves. Police Chief Scot Smithee told reporters Legan bought the gun used in the attack, described as an "AK-47-type assault rifle," legally July 9 in Nevada.

Acquaintances and neighbors say Legan didn't stand out.

Tanner Eastus, a student at Gilroy High School who was at Sunday's garlic festival, told CNN that Legan "seemed like a normal guy."

One of Legan's neighbors, Rosana Mendoza, told CNN she would sometimes see Legan and his brothers playing basketball or hanging out in their front yard.

"I would say hi to them," Menoza told the news network. "They are very nice kids. When I found out this morning, I was shocked. This is a quiet place."

The singer of a band at the garlic festival told reporters he heard Legan yell that he was shooting because he was "really angry."

Jack van Breen, the lead vocalist and guitarist for TinMan, told reporters he heard the shooting start as the band was playing an encore, according to the Los Angeles Times.

Van Breen told The Associated Press he saw a man wearing a green shirt and a grayish handkerchief around his neck fire into the festival's food area. Van Breen and other members of the band dove under the stage.

Legan posted on social media before the shooting.

"Ayyy garlic festival come get wasted on overpriced (expletive)," he wrote in the caption of a photo posted Sunday on his Instagram account, according to the Times and Reuters. The image, which was posted to an account that appeared to be only a few days old, showed people walking through the festival grounds, Reuters reported.

In the caption of a second photo posted on social media, which featured a Smokey Bear sign warning of the day's fire danger, Legan urged people to read Ragnar Redbeard's "Might Is Right," according to the Times. The book, published in the 19th century, has been described as a misogynistic, white supremacist text, according to CNN.

The post caption continued, "Why overcrowd towns and pave more open space to make room for hordes of mestizos and Silicon Valley white (expletive)?" Reuters reported.

It's not clear if Legan was influenced by any radical ideologies.

Craig Fair, assistant special agent in charge of the FBI's San Francisco field office, told reporters Monday that it was too early to say whether Legan was influenced by any radical groups, though the FBI continued to investigate any possible ties.