Law enforcement officers salute as the body of a Bay Area Rapid Transit police officer draped with the American flag is loaded into an Alameda County Sheriff's Coroner vehicle at Eden Medical Center in Castro Valley, Calif., Tuesday, Jan. 21, 2014. The officer was shot while serving a probation search warrant at a residence in Dublin, Calif., according to authorities. (AP Photo/The Contra Costa Times, Anda Chu)

SAN FRANCISCO (AP) — A public transit officer in the San Francisco Bay Area accidentally shot and killed another transit officer while they were conducting a search on the apartment of a robbery suspect who was in custody, authorities said.

Details of how Tuesday afternoon's shooting by a Bay Area Rapid Transit officer unfolded in the East Bay city of Dublin were unclear, and sheriff's officials were searching for answers.

"That's going to be part of the investigation, to find out if this was some sort of an accidental discharge or whether it was a case of target misidentification," Alameda County Sheriff's Sgt. J.D. Nelson told KTVU-TV. "Either way it was an accident, and we're going to try to figure out exactly what happened and the circumstances that led up to it."

The slain officer was identified as BART Sgt. Tom Smith, 42, of San Ramon. Smith, a detective who's been with the department for 20 years, is survived by his wife and 6-year-old daughter, Gov. Jerry Brown said in a statement.

"Sergeant Smith's family, friends and colleagues are in our thoughts as we honor his service during this painful time," the statement said.

The officers — members of BART's detective unit — were searching the apartment as part of an investigation into a man suspected of committing robberies on BART property, authorities said.

Nelson said the officer who shot Smith has been in law enforcement for more than 10 years.

"You also have to understand how devastated he is at this point," he told KTVU. "This was certainly not his intent, and you can only imagine the heartbreak that that officer has."

The officers knew the suspect, whose name has not been released, was in custody and not home at the time, Nelson said.

They wore bulletproof vests and began their search by knocking twice on the door, Nelson told the Contra Costa Times (http://bit.ly/LFOJSi). Each knock went unanswered, but the door was unlocked, so several of them stepped inside with their guns drawn, Nelson said.

He said the officers thought someone was inside because the door was unlocked.

Details about what happened next haven't been released, but Nelson told the newspaper that an officer fired one shot.

Smith was taken to Eden Medical Center in Castro Valley, where he died from his injuries — the first on-duty fatality in BART police's 42-year history, authorities said.

Television reports showed lines of officers outside the hospital saluting as their fallen comrade's body, draped in a large American flag, was loaded into a coroner's van.

"We ask that everyone please give us a chance to catch our breath" and to grieve, he said.

"The entire BART organization is deeply saddened by this tragic event, and we ask the public to keep the officer's family in its thoughts and prayers," Rainey and BART General Manager Grace Crunican said earlier in a joint statement.

They said they were withholding other details for now. The name of the officer who fired hasn't been released.

The police agency has been the center of other controversies.

Among them was the fatal shooting on New Year's Day 2009 of Oscar Grant III, an unarmed black BART passenger who had been detained at the Fruitvale station after reports of a fight.

Officer Johannes Mehserle, who is white, drew his gun and shot Grant in the back as he lay face down on the platform. The event was recorded by many video and cellphone cameras and was followed by a series of large protests.

Mehserle was convicted of involuntary manslaughter and sentenced to two years minus time served.

An independent auditor said last month that BART police have made significant progress in meeting reforms instituted after Grant's death, including increased officer training about bias and other issues, along with better reporting about incidents involving use of force.

Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

*We welcome your comments on the stories and issues of the day and seek to provide a forum for the community to voice opinions. All comments are subject to moderator approval before being made visible on the website but are not edited. The use of profanity, obscene and vulgar language, hate speech, and racial slurs is strictly prohibited. Advertisements, promotions, and spam will also be rejected. Please read our terms of service for full guides