Samuel Cassidy, an employee at the Santa Clara Valley Transportation Authority (VTA) site in San Jose, opened fire at the site on Wednesday for reasons not yet known.
He killed himself as police closed in on him, officers said.
The mass shooting was the California Bay area’s deadliest since 1993.
So far this year, the US has recorded 233 mass shootings, the Gun Violence Archive reports.
According to the local sheriff’s office, this was “a planned event and the suspect was prepared to use his firearms to take as many lives as he possibly could before his eminent death”.
Police announced on two days after that the gunman had also set his home on fire before the attack.