(CNN) -- A California transit officer shot and killed another officer Tuesday in an incident that authorities are calling a "tragic accident."
The two Bay Area Rapid Transit police officers were conducting a search Tuesday afternoon of a Dublin apartment in connection with a spree of train robberies when the shooting occurred, according to Alameda County Sheriffs spokesman Sgt. J.D. Nelson.
During the search, the "officer accidentally fired his weapon and struck and killed another officer," Nelson said. "This appears to be a terrible and tragic accident."
The incident is being investigated.
BART Police Chief Kenton Rainey said he was "deeply saddened" by the incident.
The shooting marks the first death of a BART police officer in the agency's history, CNN affiliate KGO reported.
CNN's Janet DiGiacomo and Augie Martin contributed to this report.