A former deputy was fatally shot by officers Friday night after he stabbed and beat to death his mother, sister and another resident of the home where he lived, officials said.

>> Read more trending news

David Gerald McNabb, 43, was shot by deputies in the home where he is believed to have killed his mother, Melanie McNabb, 64; his sister, Nicole McNabb, 34; and Carlos Echavarria, 63, according to the Santa Barbara Sheriff's Office.

A woman entered the home and found a body covered in blood in the bathtub, then ran out and called authorities, the Ventura County Star reported.

Deputies arrived and determined McNabb was still inside. They entered the house and made contact with McNabb, who was armed with a rifle, the Star reported.

Deputies shot McNabb with beanbag and nonlethal rounds before fatally shooting him, officials said.

He was taken to a hospital where he was pronounced dead, the Star reported.

McNabb worked as a custody deputy with the Santa Barbara Sheriff’s Office from June 2001 to March 2012, when he voluntarily resigned.

He was arrested by Oxnard police in September 2012. He was convicted of felony domestic violence in May 2014.