SAN JOSE, Calif. (AP) -- Taptejdeep Singh died trying to save others from a gunman. Kirk Bertolet saw some of his coworkers take their last breaths.
And friends, family and survivors were left to mourn after nine men died this week when a disgruntled coworker hauling a duffle bag full of guns and ammunition opened fire at a Northern California rail yard complex, apparently choosing his targets and sparing others.
Samuel Cassidy, 57, turned the gun on himself Wednesday morning as sheriff's deputies rushed in at the Santa Clara Valley Transportation Authority in San Jose.
Investigators were still trying to determine Friday what might have set off Cassidy, who for years apparently held a grudge against the workplace he detested.
The victims were Alex Ward Fritch, 49; Paul Delacruz Megia, 42; Taptejdeep Singh, 36; Adrian Balleza, 29; Jose Dejesus Hernandez, 35; Timothy Michael Romo, 49; Michael Joseph Rudometkin, 40; Abdolvahab Alaghmandan, 63; and Lars Kepler Lane, 63.
The minutes-long attack was marked by both horror and heroism.
Singh, the father of a 3-year-old son and a 1-year-old daughter, was on an early shift as a light rail operator when the shooting began.
He called another transit employee to warn him, saying he needed to get out or hide.
"From what I've heard, he spent the last moments of his life making sure that others -- in the building and elsewhere -- would be able to stay safe," co-worker Sukhvir Singh, who is not related to Taptejdeep Singh, said in a statement.
Singh's brother, Bagga Singh, said he was told that his brother "put a lady in a control room to hide," the San Jose Mercury News reported. "He saved her and rushed down the stairway."
Singh's brother-in-law, P.J. Bath, said he was told Singh was killed after encountering the gunman in a stairwell.
"He just happened to be in the way, I guess," Bath told the paper.
Kirk Bertolet, 64, was just starting his shift when shots rang out, along with screams. As he and his coworkers threw a table in front of their door, Bertolet called the control center.
Then there was silence.
Cautiously, Bertolet left the barricaded office, hoping he could offer first aid. He couldn't.
Bertolet, a signal maintenance worker who worked in a separate unit from Cassidy, said he is convinced Cassidy targeted his victims because he didn't hurt some people he encountered.
"He was pissed off at certain people. He was angry, and he took his vengeance out on very specific people. He shot people. He let others live," he said. "It was very personal."
Glenn Hendricks, chair of the VTA's board of directors, said he had no information about any tensions between Cassidy and the coworkers he shot.
Cassidy fired a total of 39 bullets. Camera footage showed him calmly walking from one building to another with his duffle bag to complete the slaughter, authorities said.
"It appears to us at this point that he said to one of the people there: 'I'm not going to shoot you,'" Santa Clara County Sheriff Laurie Smith said. "And then he shot other people. So I imagine there was some kind of thought on who he wanted to shoot."
Cassidy's ex-wife said he had talked about killing people at work more than a decade ago. Cecilia Nelms told The Associated Press that he used to come home from work resentful and angry over what he perceived as unfair assignments.
The shooter spoke of hating his workplace when customs officers detained him after a 2016 trip to the Philippines, a Biden administration official told The Associated Press.
A Department of Homeland Security memo said Cassidy also had notes on how he hated the Valley Transportation Authority, according to the official. The official saw the memo and detailed its contents to the AP but was not authorized to speak publicly about the ongoing investigation.
The Wall Street Journal first reported the memo.
It doesn't say why he was stopped by customs officers. It said he had books about "terrorism and fear and manifestos" but when he was asked whether he had issues with people at work, he said no. The memo notes that Cassidy had a "minor criminal history," citing a 1983 arrest in San Jose and charges of "misdemeanor obstruction/resisting a peace officer."
Neighbors, acquaintances and an ex-girlfriend described him as a loner, unfriendly, and prone at times to fits of anger.
Documents show he had worked at the transit authority since at least 2012. Bertolet said Cassidy worked regularly with the victims but he always seemed to be an outsider and perhaps couldn't take the rough humor of colleagues.
"He was never in the group. He was never accepted by anybody there. He was always that guy that was never partaking in anything that the people were doing," Bertolet said.
"I know some of those guys, they'll keep joking with you and they'll keep hammering you about stuff. And if you're thin-skinned and you can't take it ... I see that is the main cause of what's going on," Bertolet said.
Sheriff's officials said the three 9 mm handguns Cassidy brought to the rail yard appear to be legal. Authorities do not yet know how he obtained them.
He also had 32 high-capacity magazines, some with 12 rounds. In California, it is illegal to buy magazines that hold more than 10 rounds. However, if Cassidy obtained them before Jan. 1, 2000, he would have been allowed to have them unless he was otherwise prohibited from possessing firearms.
The sheriff said authorities found explosives at the gunman's home, where investigators believe he had set a timer or slow-burn device so that a fire would occur at the same time as the shooting. Flames were reported minutes after the first 911 calls came in from the rail facility.