The gunfire erupted Saturday around 9 p.m. at a gathering in a residential block of Hollister, according to the San Benito County Sheriff’s Office.
The three survivors were airlifted to a hospital in critical condition, KION-TV reported.
The television station identified the two dead men as Jamie Jesus Gomez, 23, and Daniel Eli Gonzalez, 21, both of Hollister.
Police said the victims were standing outside a home in the 300 block of Rustic Avenue when a dark-colored compact SUV drove northbound and shot them as it was passing by.
There have been no arrests. Sheriff’s investigators are searching for an unknown number of suspects who drove off in the SUV, officials said.