Updated

Prosecutors say a California police officer accidentally shot and killed a fellow officer when he mistook him for an armed assailant.

The finding was contained in a 13-page report about the Jan. 21 shooting of Bay Area Rapid Transit police Sgt. Tom Smith by Detective Michael Maes. It was reported by news outlets on Friday.

Authorities had also investigated the possibility that Maes' weapon discharged accidentally.

Alameda County Deputy District Attorney John Creighton wrote in the report that Maes opened fire after he saw a shadowy figure with an upraised firearm suddenly come out of a dark walk-in closet area. Creighton said Smith's upraised arm could have obscured the identifying markings on the front of his bullet-proof vest.

The shooting occurred while officers were searching an apartment in Dublin.