Santino William Legan was armed with an AK-47-type assault rifle when he opened fire at random on Sunday at the Gilroy Garlic Festival in California, authorities said, before being gunned down by police within one minute of launching the attack.
Law enforcement officials said on Monday they have not established a motive for the killings.
But media reports said investigators were poring over Legan's social media, including an Instagram account, created four days ago in which he referenced a white supremacist book.
One message on the account posted shortly before the attack included a picture of people at the festival with the words "Ayyy garlic festival time Come get wasted on overpriced shit," media reports said.
FIR registered in Lahore airport shooting
A second message featured a photo of Smokey the Bear with a sign that reads "Fire Danger High Today" alongside a reference to the white supremacist book "Right is Might" which promotes anarchy.
Gilroy police chief Scot Smithee said investigators were trying to confirm witness accounts of a second suspect who may have assisted Legan.
"We had reports on a potential second suspect but we don't have confirmation that he fired and we are trying to determine who it is and what his role was," Smithee told reporters at a news conference.
The dead include six-year-old Stephen Romero who was attending the festival with his mother and grandmother, who were wounded in the attack. The two other victims were identified by US media as Keyla Salazar, 13, and Trevor Irby, a recent college graduate.
"My son had his whole life to live and he was only six," Romero's father, Alberto, told the NBC television station, adding that his son was shot in the back.
Those wounded include one person in critical condition and they range in age from 12 to 69, local media said.
The killings marked the latest chapter of America's epidemic of gun violence, which has left nearly 300 people dead in mass shootings so far this year, according to Mass Shooting Tracker.
Police said Legan managed to get into the annual outdoor festival - which attracts nearly 100,000 and is billed as the "world's greatest summer food festival" - by cutting through a fence to avoid security measures, including metal detectors, that were in place.
The three-day festival held in the town 80 miles (130 kilometers) southeast of San Francisco was winding down when the shots rang out, sending festival goers scattering for cover.
President Donald Trump paid tribute to the victims on Monday at an event at the White House.
"While families were spending time at a local festival, a wicked murderer opened fire and killed three innocent citizens including a young child," Trump said.
Three dead, nine injured in Dutch tram shooting
"We grieve for their families and ask that God comfort them."
House speaker Nancy Pelosi, whose district covers most of San Francisco, spoke of the survivors' "tough road ahead" and called for action to end gun violence.
"Every day the Senate refuses to act is a stain on the conscience of our nation," she said.
Witnesses said Legan appeared to fire randomly as he began his assault.
"I could see him shooting in just every direction. He wasn't aiming at anyone specifically. It was just left to right, right to left," Julissa Contreras said, according to NBC.
"He definitely was prepared for what he was doing," she said.
Mass shootings are a frequent occurrence in the United States. Yet despite the scale of the gun violence problem, efforts to address it legislatively have largely stalled at the federal level.
According to Gun Violence Archive, a non-profit, there have been 247 mass shootings in the United States so far this year.
Authorities said Legan has purchased his weapon legally in the neighboring state of Nevada on July 9, thus skirting legislation in California which prevents anyone under the age of 21 from purchasing rifles or shotguns, with few exceptions.
The owner of Big Mikes Gun and Ammo, the store where the gun was reportedly purchased, posted a statement on Facebook on Monday saying the shooter had ordered the weapon online.
"We feel so very sorry for the Families, I am heartbroken this could ever happen," the message reads. It added that the gunman appeared happy and showed no reason for concern when he picked up the weapon.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ