SAN JOSE, Calif. — A municipal transit worker opened fire as the Wednesday morning shift was gathering for work at a San Jose rail yard, killing nine people in the latest of the mass shootings that have plagued the United States this year. California law enforcement officials identified the gunman as Samuel James Cassidy, 57, a maintenance worker who had been with the Silicon Valley's regional transit agency for at least a decade. The authorities said he appeared to have killed himself at the scene. It was unclear how many people were wounded, officials said. The gunman was an employee of the Santa Clara Valley Transportation Authority, which oversees bus, rail and paratransit service for commuters, said Sgt. Russell Davis, a spokesman for the county sheriff's office. He did not identify the weapon used, or offer a possible motive, although Mayor Sam Liccardo of San Jose said Mr. Cassidy's co-workers had "expressed generalized concerns about his mental health." At the rail yard, workers said, panic erupted as word spread of gunfire in two buildings. While bomb squads searched for explosives there, firefighters were responding to a blaze at Mr. Cassidy's empty home, about eight miles away. Survivors of the shooting were led to a separate building in the municipal complex where some were reunited with family members, a scene that James Kostmayer, a local government employee, called "heartbreaking." "You could hear the screams and cries of the families" from the elevator, he said, adding that he heard "a mother screaming, 'My son, my son.'" Christina Gonzalez choked back tears as she waited for news outside the American Red Cross center in San Jose, where survivors and their families were later sent for counseling. She said that her cousin Michael Rudometkin had been at a union meeting that morning and that his family had been unable to reach him. She described Mr. Rudometkin as "a very good person" who had "loved his job and just always stood up for everyone's rights." "I'm just waiting and hoping he's OK," she said. By Wednesday evening, the county medical examiner's office had released the names of eight victims, including Mr. Rudometkin, 40, of Santa Cruz. Also killed were Paul Delacruz Megia, 42; Taptejdeep Singh, 36; Adrian Balleza, 29; Jose Dejesus Hernandez III, 35; Timothy Michael Romo, 49; Abdolvahab Alaghmandan, 63; and Lars Kepler Lane, 63. Late Wednesday night, the medical examiner announced the death of a ninth victim, Alex Ward Fritch, 49, who died at the Santa Clara Valley Medical Center.