SAN JOSE (CBS SF) — The man who shot and killed nine people at a Santa Clara Valley Transportation Authority (VTA) light rail yard Wednesday was identified as Samuel Cassidy, 57, a San Jose resident and VTA employee.

Federal authorities authorities have also confirmed that Cassidy had been detained by U.S. Customs agents five years ago because he had writings about terrorism and hating his workplace.

UPDATE: Huge Arsenal of Weapons, Molotov Cocktails Cleared From VTA Shooter’s Home

He was armed with three automatic handguns and more than 30 illegal magazines of ammunition when he went on his rampage. Cassidy took his own life after being confronted by San Jose police officers and Santa Clara County sheriff’s deputies who had raced to the scene.

Authorities also revealed that bomb making materials were found in what was believed to be Cassidy’s locker at the VTA yard.

Samuel Cassidy (Santa Clara County Sheriff’s Office)

Cassidy had worked for Valley Transportation Authority since at least 2012, according to the public payroll and pension database Transparent California, first as a mechanic from 2012 to 2014, then as someone who maintained substations.

SPECIAL SECTION: San Jose VTA Shooting

Cassidy earned more than $114,000 in regular and overtime pay along with an additional $46,000 in benefits in 2019, according to public records.

UPDATE: VTA Officials Memorialize Employees Killed In Massacre

He was listed as the owner of a home on the 1100 block of Angmar Ct. in the Ramblewood neighborhood of South San Jose, which caught fire around the same time as the VTA shooting.

Investigators said the arson blaze was triggered by a pot of ammunition left slow-cooking on his stove and a kitchen sprayed with accelerants.

Search teams also found a massive cache of weapons, ammunition and over a dozen Molotov cocktails inside the burned structure.

Firefighters responded to the fire at the home minutes after Cassidy began his deadly rampage at the transit facility.

Investigators were trying to not only determine the motive behind the shooting that left nine co-workers dead, but also if the fire was set on a time delay to divert first responders away from the VTA yard.

“The intent was to burn down the house,” Santa Clara Sheriff Laurie Smith said. “He knew what he was doing.”

UPDATE: Coroner Identifies 9 People Killed At VTA Light Rail Yard

Cecilia Nelms was married to Sam Cassidy for about ten years. She said Cassidy had anger issues but never physically hurt her. “I’m in shock, I’m very confused,” she said.

Nelms recalled how uncomfortable he was around other people. “Not a very friendly person, kept things to himself,” said Nelms.

Nelms said there were instances where Cassidy would talk about harming coworkers but never imagined it would happen.

An ex-girlfriend of Cassidy alleged in court documents he forced sexual acts on her and showed signs of being bipolar, with mood swings that worsened with alcohol. After his divorce, the ex-girlfriend alleges they had a volatile off and on relationship for about a year, with Cassidy actually filing a restraining order.

The ex-girlfriend’s attorney Robert Cummings spoke on his clients behalf. “They met on Match. They dated for two months and he proposed but she turned him down. After that he became a very different person,” Cummings said.

KPIX 5 stopped by his Cassidy’s parents’ house in Cupertino. They refused to comment but their neighbor was absolutely stunned to hear Cassidy was the shooter.

“Wait, wait, wait, you say he’s the killer?” said neighbor Jenny Wu. “He’s responsible? Really?”

Doug Suh, a neighbor of Cassidy’s who has lived across the street for the past two decades, described him as “mean” and untalkative, saying he and his wife tried to avoid interactions with him.

The neighbor said Cassidy lived by himself and would head to work at 5 a.m. every day.

Suh added that Cassidy came out of his house once when Suh had backed into Cassidy’s driveway to make a turn, telling Suh to get off his property.

Suh provided KPIX with surveillance video that showed a man — presumably Cassidy — leaving the home at around 5:40 a.m. Thursday morning with a duffel bag.

According to Suh, a short time later, he looked outside and saw a huge plume of smoke rising from Cassidy’s home.