An employee fatally shot eight people at a California train yard before turning the gun on himself as police closed in.
The shooting took place at the Santa Clara Valley Transportation Authority (VTA) site in San Jose.
“When our deputies went through the door, initially he was still firing rounds,” Santa Clara County Sheriff Laurie Smith told journalists.
Officials say the victims include transit employees.
The gunman opened fire early at around 06:45 local time (14:45 GMT) on Wednesday in the VTA light rail yard. According to a local CBS station, the attack unfolded during an employee meeting.
Law enforcement officials told CBS News, the BBC’s partner in the US, that the gunman was 57-year-old Samuel Cassidy.
Deputy Russell Davis, a spokesman for the Santa Clara County Sheriff’s Department, said “deputies did not exchange gunfire” with the suspect.
“Preliminarily, we’re going to go with the assumption it was a self inflicted gunshot.”
Just before the shooting, a fire broke out at a home belonging to Cassidy, according to local media.
Authorities say they are looking into whether the suspect may have set his home on fire before embarking on the rampage.
The Santa Clara VTA – Valley Transport Authority – operates three train lines, making up over 40 miles (65km) of rail. It also operates about 70 bus lines in the city.
Santa Clara is the largest county in California’s Bay Area and is home to Silicon Valley. It encompasses several cities in Northern California including Cupertino, San Jose and Mountain View.
US President Joe Biden called the attack a “horrific tragedy” and ordered flags to be flown at half mast as he again urged Congress to take action on gun control.
“Every life that is taken by a bullet pierces the soul of our nation,” he said. “We can and we must do more.”