SAN FRANCISCO (Reuters) - When a California college student was killed by a gun-wielding stranger on a crowded commuter train in San Francisco, none of the dozens of passengers on board saw it coming; officials say they were too absorbed in their mobile devices.

San Francisco Police via AP This Sept. 23 image taken from a surveillance video and provided by the San Francisco Police Department show suspect Nikhom Thephakaysone on a MUNI train in San Francisco.

A spokeswoman for San Francisco District Attorney George Gascon confirmed on Wednesday that surveillance footage of the incident last month showed a train car full of passengers within feet of the accused gunman as he openly brandished a weapon on the train.

San Francisco police Chief Greg Suhr said that Nikhom Thephakaysone, 30, is accused of firing a single fatal shot at San Francisco State University student Justin Valdez "for no apparent reason" as the college sophomore began to exit the train at a stop near the university.

"You can clearly see on the video that multiple people are paying attention to their cell phones; they're texting, they're talking," Gascon told reporters in the days following the incident, which has since attracted national media attention.

"No one notices that he's brandishing the gun at several locations and everybody is in very close proximity, which is somewhat concerning," he added.

Authorities said that after the September 23 incident, the gunman got off the train and walked home.

Authorities were not blaming the slaying on cell phones, although they said it did highlight concerns that people on smartphones or other mobile devices might be at risk of missing signs of impending dangers.

Following the train incident, Gascon urged the people stay alert in public spaces, saying that law enforcement officials would "continue to talk about how important it is to be aware of your surroundings."

The day after the shooting, Thephakaysone, who police said pointed his gun at strangers in at least two separate incidents on the night of the shooting, was arrested at his family's San Francisco home.

In his residence, police said they found three firearms, $20,000 in cash and a backpack full of survival gear, including combat knives, razors, a flashlight and first-aid kit. Police did not immediately know why he may have had the paraphernalia.