Bay Area Transit officer fatally shot by another officer during raid of suspect’s home (VIDEO)

A gurney carrying Smith’s body was rolled out of the hospital, draped in an American flag, as fellow officers and others stood saluting, paying respect to the fallen officer. (Photo credit: Mercury News)

A gurney carrying Smith’s body was rolled out of the hospital, draped in an American flag, as fellow officers and others stood saluting, paying respect to the fallen officer. (Photo credit: Mercury News)

A Bay Area Rapid Transit police sergeant was accidentally shot and killed by a fellow officer Tuesday afternoon during a raid of a suspect’s apartment in Dublin, California, local media reported.

Sgt. Tom Smith Jr. had gone to the apartment with several other law enforcement officers from BART, Dublin Police and Alameda County Sheriff’s department to carry out a probation search around 2 p.m.

Officers knocked on the door twice, but received no answer. However, the door was unlocked, so officers simply walked inside. Not knowing whether the apartment was occupied, officers likely entered with their weapons drawn, as is standard procedure.

The resident, a convicted felon and suspect in a rash of recent robberies on BART property, was not home at the time.

Authorities have yet to release the exact details of what happened next, but it is known that at some point another officer fired his gun, striking Smith. The officers conducting the raid were wearing bullet proof vests, but it is unknown where Smith was shot. He was rushed to a hospital in Castro Valley where he died a short time later.

“It is with a heavy heart that I have to announce the tragic loss of the first BART officer killed in the line of duty,” BART police Chief Kenton Rainey said at the hospital around 4 p.m. Tuesday. “We ask everyone to give us a chance to catch our breath.”

Sgt. Tom Smith Jr. (Photo credit: BART)

Sgt. Tom Smith Jr. (Photo credit: BART)

Smith, a 20-year law enforcement veteran, was the first officer killed in the line of duty in BART’s 42-year history.

“This is a shocking thing for a BART officer to be killed in the line of duty,” elected BART Director Gail Murray added. “But like all peace officers, our BART police risk their lives when they go out to work in the stations and cities. We feel very saddened for the family, who would not expect (this to) happen to their loved ones.”

The 42-year-old officer leaves behind a wife and young daughter.

Neha Shah, one of Smith’s neighbors called him “an amazing dad, an amazing neighbor, and amazing man.”

The name of the officer who fired the fatal shot is not being released, but authorities confirmed that he is a veteran officer of more than 10 years.

It’s unknown at this point if the officer’s gun went off accidentally or if it was a case of a misidentified target.

The incident remains under investigation.

Correction: The headline originally stated a San Francisco officer was killed, but this was incorrect. He was a Bay Area Rapid Transit officer. Thanks to Guns.com fans Damon Knox and Brian Schmidt for calling our attention to this mistake.