Eight people were killed in a mass shooting during a union meeting at a train yard in San Jose, California, on Wednesday.

Santa Clara County sheriff Laurie Smith said officers ran into the building as shots were being fired in “heroics that resulted in a diminished loss of life”.

Authorities did not immediately offer many details or a possible motive for the shooting, which unfolded at about 6:30 a.m. Pacific Time (1330 GMT) at a light-rail yard for commuter trains of the Santa Clara Valley Transportation Authority (VTA), in the heart of Silicon Valley in the San Francisco Bay Area.

A bomb squad was searching the yard and adjacent buildings after at least one explosive device was found, Santa Clara County Sheriff’s Deputy Russell Davis said at a news conference.

Sheriff Laurie Smith told reporters that gunfire was still going on when her deputies arrived, and the assailant took his own life, apparently when he realized police were closing in.

Officers never exchanged gunfire with the suspect, Davis said. Smith credited swift action by sheriff’s deputies, who rushed to the scene from their own headquarters next door to the rail yard, preventing what might have been a much greater loss of life.

Governor Gavin Newsom, appearing with Smith and others in San Jose, voiced exasperation at the scale of gun violence in America.

“There is a sameness to this and that numbness, I think, is something that we are all feeling,” Newsom said. “It begs the damn question, What the hell is going on in the United States of America? What the hell is wrong with us and when are we going to come to grips with this?”

The gunman and the nine victims were all employees of the transit agency situated near the city’s airport, officials said. The victims were found in two buildings on the site.