'We have multiple casualties' -Santa Clara County Sheriff's office

Santa Clara County Sheriff's Deputy Russell Davis told reporters that "there are multiple injuries and multiple fatalities" and the assailant was dead.

"I can't confirm the exact number of injuries and fatalities," he said. He said he could not identify the shooter or confirm how they died.

The shooting took place just before 7 a.m. Pacific Time (1400 GMT) at a light rail yard run by the Santa Clara Valley Transportation Authority near the city's main airport.

"The shooter is no longer a threat, and the facility has been evacuated," San Jose Mayor Sam Liccardo wrote on Twitter.

San Jose, a city with about 1 million residents, lies at the heart of Silicon Valley, a global center of technological innovation and home of some of America's biggest tech companies.

A local ABC News affiliate reported that the building was not open to the public, so the assailant would have needed employee access or to have broken in. News footage of the yard showed a cluster of industrial hangar-like buildings adjacent to rail tracks.