A California transit employee killed eight co-workers and wounded another before taking his own life on Wednesday in the latest of a spate of deadly mass US shootings, prompting the state's governor to ask: "What the hell is wrong with us?"

Authorities did not immediately offer many details or a possible motive for the shooting, which unfolded about 6.30am Pacific Time (9pm last night in Malaysia) at a light rail yard for commuter trains of the Santa Clara Valley Transportation Authority (VTA).

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 first deputies arrived at the scene and that the assailant took his own life, apparently when he became aware that police were closing in on him.

A local resident watches from his front yard as police and fire investigate the scene of the Santa Clara Valley Transportation Authority mass shooting suspects house that was set ablaze in San Jose, California, U.S. May 26, 2021

She credited swift action by sheriff's deputies, who rushed to the scene from their own headquarters next door to the rail yard, with 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 frequency and regularity 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, the eight victims he shot dead, and a survivor who was hospitalised in critical condition were all employees of the transit agency situated near the city's airport, officials said. Authorities did not give the gunman's name or age.

California Governor Gavin Newsom

San Jose’s The Mercury News and other media outlets identified him as Samuel Cassidy, 57, a maintenance worker at the yard.

Cassidy had worked for the transit authority since at least 2012, when he was listed as an "electro-mechanic," and was promoted to "substation maintainer" in 2015, according to records posted by the nonprofit website Transportation California.

Last year, he earned a salary of $102,000, plus benefits and $20,000 in overtime, the records showed.

Local television station KTVU-TV reported that Cassidy had been married for 10 years and divorced in 2009, citing an interview with his ex-wife, who reportedly told the station she had little contact with him over the past decade.

'Essential workers'

"A horrible tragedy has happened today and our thoughts and love go out to the VTA family," Glenn Hendricks, chairman of the VTA board, told reporters.

He said the shooting took place in a section of the rail yard where workers perform maintenance on vehicles, which was not in the facility's operations and control centre.

San Jose, a city of about one million residents, lies at the heart of Silicon Valley, a global technology hub and home to some of America's biggest high-tech companies.

Valley Transportation Authority workers wait outside the Santa Clara Sheriff's offices as police secure the scene of a mass shooting at a rail yard run by the Santa Clara Valley Transportation Authority in San Jose, California, U.S. May 26, 2021

"These are, and were, essential workers," San Jose's mayor, Sam Liccardo, said of the victims.

He confirmed in television news interviews that authorities had also responded to a fire at the home of the suspect that erupted at about the same time as the shooting.

Multiple Fire Department, police and bomb squad vehicles were still parked outside the suspect's house, along a cul-de-sac in southeastern San Jose, hours after the shooting.

An explosives-detecting robot sat in the street near the home while two bomb squad technicians entered the ranch-style house. Arson investigators along with agents of the FBI and US Bureau of Alcohol, Tobacco, Firearms and Explosives were also present.

US President Joe Biden was briefed on the shooting, and his staff continued to monitor the situation while keeping in close contact with local officials to offer any assistance needed, the White House said.

Police secure the scene of a mass shooting at a rail yard run by the Santa Clara Valley Transportation Authority in San Jose, California, U.S. May 26, 2021

"What's clear, as the president has said, is that we are suffering from an epidemic of gun violence in this country, both from mass shootings and in the lives that are being taken in daily gun violence that doesn't make national headlines," White House spokesperson Karine Jean-Pierre told reporters.

Mass gun violence, commonplace in a country with one of the highest rates of firearm ownership in the world, has escalated considerably following a year-long lull as the United States emerged from the worst of the Covid-19 pandemic this spring.

Wednesday's incident was the latest of at least eight deadly US mass shootings in the past three months, including a string of attacks at Atlanta-area day spas in mid-March and a rampage days later that left 10 people dead at a Colorado supermarket. Last month, a former employee of an Indianapolis FedEx centre shot eight workers to death and then took his own life.

- Reuters