OAKLAND, Calif.—Funeral services have been set for a San Francisco Bay Area transit officer who was shot and killed by a fellow officer while they searched the home of a robbery suspect.

Bay Area Rapid Transit Police Chief Kenton Rainey told board members during a meeting on Thursday that Sgt. Tom Smith's funeral will be held at 10 a.m. Wednesday at a church in Castro Valley. It will be open to the public.

Smith was shot on Tuesday during the search in Dublin. He was the first BART officer killed in the line of duty in the department's 42-year history.

Investigators are trying to determine whether the officer who shot Smith mistook him for someone else or the weapon discharged accidentally.