SAN JOSE, Calif. (KGO) -- Officials have released more information about the suspect in the deadly shooting at the VTA light rail yard in San Jose. The shooter killed nine people before it appears he took his own life, the Santa Clara County Sheriff's Department said.
LATEST ON SJ SHOOTING: 10 people dead in San Jose VTA rail yard shooting, including gunman
The suspect has been identified by two law enforcement officials as 57-year-old Sam Cassidy, a VTA employee.
Cassidy had three semi-automatic weapons and 32 magazines full of ammunition when he opened fire on his coworkers, authorities said.
RELATED: Victims ID'd after deadly attack at VTA light rail yard
On Friday, officials announced they found a stockpile of weapons, Molotov cocktails and 25,000 rounds of ammunition at his home. A locker at the rail yard believed to be the shooter's also contained "materials for bombs, detonator cords, the precursors to an explosive," said Santa Clara County Sheriff Laurie Smith.
In a one-on-one interview with ABC News, Sheriff Laurie Smith described law enforcement's first encounter with the shooter. A moment later, officers saw him turn the gun on himself and take his own life. It happened so fast there was no exchange of gunfire, Smith said.
Cassidy fired 39 rounds and appears to have targeted some of his victims, according to the Santa Clara Sheriff's Department.
A witness who survived the shooting told ABC7 News that from his vantage point, it looked like the gunman didn't fire indiscriminately. Rather, he let some people live and chose to kill others.
The shooter had talked about killing people at work more than a decade ago, his ex-wife said.
"I never believed him, and it never happened. Until now," a tearful Cecilia Nelms told The Associated Press.
Cassidy had long history of dissatisfaction with his employer, according to law enforcement agencies.
He was once stopped by Customs and Border Protection while returning from the Philippines in 2016, sources tell ABC News. He was stopped and searched because he was carrying books about terrorism and manifestos, according to three sources familiar with the investigation. CBP found he was also carrying a notebook that detailed hatred of his workplace, the Valley Transportation Authority.
"We can say that the suspect has been a highly disgruntled VTA employee for many years, which may have contributed to why he targeted VTA employees," the sheriff's department said in a statement.
Filings show two cases involving Cassidy in family court: one domestic violence case and one finalizing his divorce.
Cassidy reportedly set fire to his home on Angmar Court in East San Jose before the shooting. Deputies say Cassidy set the fire by putting ammunition inside a pot on the stove, then placing additional accelerants around the stove.
Surveillance video obtained by ABC7 News shows Cassidy leaving his home shortly before the house went up in flames.
Payroll records obtained by the ABC7 News I-Team show he made $160,000 in base pay, overtime and other pay as a VTA substation maintainer.
In an interview with ABC7 News, a neighbor of Cassidy's said he wouldn't make conversation when greeted. The neighbor also explained an incident where he was backing out of his driveway and Cassidy started yelling at him. The man said after that encounter he never talked to the suspected shooter again.
The neighbor also said he believed Cassidy lived alone and never saw anyone else at his house.
Take a look at the latest stories and videos about the mass shooting at the VTA rail yard in San Jose.
ABC7 News' Alix Martichoux and the Associated Press contributed to this report.