SAN JOSE, Calif. — The first reports of gunfire at the Santa Clara Valley Transportation Authority light rail yard near downtown San Jose, Calif., came in at 6:34 a.m. on Wednesday, about half an hour into a morning shift.
Inside the complex, terrified employees flooded into a parking lot. The gunman might be on the third floor, a dispatcher told San Jose firefighters, though it was not clear from the 911 calls coming in which building he was in. Shots kept ringing out. Send more ambulances, the dispatcher said.
Three minutes later, another call came in. Eight miles from the rail yard, heavy smoke billowed from a single-story home in a suburban neighborhood. Firefighters headed out to combat the flames.
Only later would the authorities realize that the shooting and the fire were related: The gunman, identified by officials as a 57-year-old man named Samuel Cassidy, who had worked in maintenance at the transportation authority for many years, lived in the burning house.
He might have set off a device to start the blaze at the same time that he opened fire on his co-workers, armed with three semiautomatic handguns and 32 high-capacity magazines, each holding 12 rounds, the Santa Clara County Sheriff’s Office said on Thursday. Deputy Cian Jackson, a spokesman for the Sheriff’s Office, said a witness reported that the gunman told someone at the scene that he was not going to hurt the person, suggesting that he might have selected his victims.
Nine men, ages 29 to 63, died. Mr. Cassidy killed himself, the authorities said.
Indications that Mr. Cassidy held anger toward his workplace had been discovered by federal officials years earlier, after Customs and Border Protection stopped him as he returned from a trip to the Philippines in 2016. When officers searched his bags, they found books about terrorism, manifestoes and a notebook detailing how he detested the transportation authority, known as the V.T.A., according to an official who spoke on condition of anonymity to describe the contents of an internal message sent around the agency after the shooting.
The Homeland Security Department, which includes Customs and Border Protection, declined to comment, citing an investigation into the shooting in San Jose. The 2016 incident was earlier reported by The Wall Street Journal.
“Based on recent developments in the investigation we can say that the suspect has been a highly disgruntled V.T.A. employee for many years, which may have contributed to why he targeted V.T.A. employees,” Deputy Russell Davis of the Santa Clara County Sheriff’s Office said in a statement.
Sheriff Laurie Smith of Santa Clara County described the gunman’s killings as deliberate, though it was unclear whether he chose his victims. None of the people who were shot survived. The sheriff suggested that the carnage, spread out over two buildings, could have been worse if deputies, whose headquarters is next door to the rail yard, had not arrived quickly.
Sheriff Smith said in an interview that the gunman turned to a union representative who was at the site for an impromptu visit and said something like “I’m not going to shoot you” immediately before he began killing his colleagues.
“He was very deliberate, very fast,” she said. “He knew where employees would be.”
The Santa Clara County medical examiner’s office identified the victims as Paul Delacruz Megia, 42; Taptejdeep Singh, 36; Adrian Balleza, 29; Jose Dejesus Hernandez III, 35; Timothy Michael Romo, 49; Michael Joseph Rudometkin, 40; Alex Ward Fritch, 49; Abdolvahab Alaghmandan, 63; and Lars Kepler Lane, 63.
They were part of a close-knit group of workers who helped keep the transit agency’s buses and light rail trains moving. Several were fathers, and they included immigrants from the Philippines, India and Iran.
Mr. Balleza, the father of a 2-year-old son, had worked at the V.T.A. since 2014. He had been excited to go fishing with his son one day, his wife said. Mr. Singh enjoyed playing volleyball and had moved to the United States from India in 2005. Mr. Megia had moved to the United States from the Philippines when he was a toddler and loved to take his two sons, daughter and stepson wakeboarding, his father said. They had planned to leave for a trip to Disneyland on Thursday.
“We don’t know the relationships or the correlations between the victims and the shooter,” said Arturo E. Aguilar, the chairman of the California Conference Board of the Amalgamated Transit Union, a labor group that represented the workers who died. The people who died worked in various departments, he added in an interview on the lawn outside the union’s San Jose office on Thursday.
As the shooting began, Mr. Singh, who would become one of the victims, alerted colleagues: At 6:36 a.m., he called Sukhvir Singh, another employee, with an urgent warning. “Hey! There’s an active shooter,” Sukhvir Singh recalled Taptejdeep Singh saying. “Get out.”
Sukhvir Singh, who specializes in repairing and maintaining the light-rail trains that run through San Jose and is not related to Taptejdeep Singh, fled with crew members to a windowless building that houses antique railroad vehicles. They waited there until it was over.
“He is the hero for everyone,” said Sukhvir Singh, who described Taptejdeep Singh as unfailingly gracious and helpful.
He said Mr. Cassidy barely knew Taptejdeep Singh, who worked in a different department as a light-rail operator, and in a different building. “They didn’t have any connection at all,” he said.
For a time, Sukhvir Singh worked in the same building as Mr. Cassidy. He would pass him in the halls and say hello, he recalled, and Mr. Cassidy might acknowledge him with a grunt. “He didn’t really communicate with other people,” Sukhvir Singh said. “He was in his own world.”
In Santa Cruz, Calif., Mr. Cassidy’s ex-wife, Cecilia Nelms, 64, said on Thursday that he was depressed and angry throughout their 10-year marriage. They had not spoken in 13 years, she said.
He proposed three months after they met at a nightclub in Cupertino, Calif., when Mr. Cassidy worked as a mechanic for a Mazda dealership. He loved cars and pets and kept several boa constrictors in addition to the couple’s two dogs. He later began working for the V.T.A.
Over the years, Ms. Nelms said, Mr. Cassidy’s personality changed, and he grew meaner, angrier and more impatient. He struggled with depression and took medication for it. He complained about his co-workers at the V.T.A., grumbling that some were lazy or had easier jobs than he did.
Occasionally, Ms. Nelms said, Mr. Cassidy would say, “I wish I could kill them.” She said she did not think he was serious.
The couple, who had no children, broke up in 2004 and divorced.
Mr. Cassidy lived in a one-story home with white trim and a patchy lawn in the Evergreen neighborhood in a suburban corner of southeastern San Jose. After the shooting, the neighborhood was swarmed with fire and police vehicles, federal agents and a boxy blue truck from the San Jose bomb squad. Men with gas masks and oxygen tanks stood amid the flashing lights in the cul-de-sacs of what they all described as a quiet suburban neighborhood that is home largely to Vietnamese and Filipino immigrants.
Doug Suh, who lives across the street, said Mr. Cassidy lived alone and rarely had visitors.
“I was afraid of him,” Mr. Suh said. “My wife was scared of him, too.”
Mr. Suh recalled Mr. Cassidy once lashing out at him when Mr. Suh turned his car around in Mr. Cassidy’s driveway. “He yelled, ‘Do not come onto my driveway.’”
On Wednesday after the shooting, Mr. Suh scanned through his security camera footage. The camera captured Mr. Cassidy at 5:40 a.m. — less than 45 minutes before he opened fire at the rail yard — loading his white pickup truck with a black bag. He was wearing a uniform with reflective stripes.
“What about all these families that lost sons and fathers?” Anthony Nguyen asked in an interview in his driveway. “I’m so sorry for them. It’s not right. All these broken hearts.”
Thomas Fuller reported from San Jose, and Kellen Browning from San Jose and Santa Cruz, Calif. Reporting was contributed by Shawn Hubler in Sacramento and Eileen Sullivan in Washington. Also contributing reporting were Maria Cramer, Adeel Hassan, Giulia McDonnell Nieto del Rio, Frances Robles, Daniel Victor and Neil Vigdor. Susan C. Beachy and Kitty Bennett contributed research.