SAN JOSE (KPIX) — Santa Clara County district attorney Jeff Rosen is ready to ask the United States Department of Homeland Security why the agency didn’t inform local authorities about detaining and interviewing the man behind last week’s mass shooting at the VTA railyard in San Jose.

VTA employee Samuel Cassidy went on a bloody rampage early on the morning of May 26, killing nine of his coworkers before turning a gun on himself as authorities converged on him.

“Samuel Cassidy was on the radar at least of Customs Border and Protection in 2016, but that information was not shared with local law enforcement here in our county. It was not shared with the DA’s office,” Rosen said. “I’d like to know why they stopped him and exactly what they found when they stopped him, if he made any statements. Why wasn’t this information shared with the San Jose police department or the DA’s office to understand? There may be a good reason, I don’t know.”

According to a Homeland Security memo obtained by the Wall Street Journal, U.S. customs officers detained Cassidy after a trip to the Philippines in August 2016. The newspaper reports that the memo explained Cassidy had “books about terrorism and fear and manifestos … as well as a black memo book filled with lots of notes about how he hates the VTA.”

Last Wednesday, Cassidy opened fire at the VTA railyard in San Jose where he had worked for years. He reportedly also used a timer to set his home on fire to coincide with the mass shooting.

“There may have been a number of interventions,” Rosen said. “Whether this would have made a difference and prevented Mr. Cassidy from murdering nine people and then killing himself, we will never know.”

Rosen said that, had U.S. Customs and Border Protection informed police or his office they had detained Cassidy, it would’ve triggered an investigation at the very least.

He said police would have interviewed Cassidy, which would have resulted in a gun violence restraining order request to temporarily take away Cassidy’s firearms or a mental health treatment plan offered and perhaps mediation at the VTA.

“I can assure people that these gun violence restraining orders that we have gotten have saved lives and stopped mass shootings,” Rosen said. “I just went to a funeral earlier today for one of the employees and it’s incredibly sad and heart wrenching … last week I was present when the medical examiner’s office informed seven different families that their father, their brother, their son had been murdered and I heard the screams, the grief, people passed out, people threw up. It was awful and that stays with me and it makes me even more resolved to do everything we can to prevent more gun violence.”

Rosen said he submitted the required forms to the agency in order to obtain reports and documents on Cassidy’s detainment. He said that, once he reviews them, he plans to speak with Customs and Border Protection about how to move forward so that there is improved communication between the agency and local authorities.

When asked how he felt about learning of the detainment through the media rather than the federal agency, Rosen replied, “I’ll be blunt about that. That’s not the way that the DA or the police departments should be learning about this information. That needs to change.”