Johnny Louis Gonzales, 28, of San Bernardino died at San Bernardino's Community Hospital shortly after the 2:30 p.m. shooting in 2400 block of North San Benito Avenue.
"They didn't know if it was a knife or if he was actually pulling a gun on them," said homicide Sgt. Gary Robertson.
Police were called to the address after reports of a family fight, officials said.
Family members told officers that Gonzales wasn't welcome at the home, police said.Gonzales had left before police arrived, but he returned to the home while officers were there.
He reportedly charged at officers, pulling the club from his waistband and then throwing it at their heads, investigators said.
Officers said Gonzales threw the club before they knew what he had in his hand. They fired at him several times, police said.
Neither officer was injured.
"We teach officers when they should use deadly force and when they should not," said Charles Evans, spokesman for the California Commission on Peace Officer Standards and Training. "But when they're in the field they make that threat assessment, not us."
There is always uncertainty when dealing with suspects, he said.
"Even though we teach levels of threat, it's always different in the field," Evans said.
It was unknown if either officer had been involved in an officer-involved shooting before Thursday.
Court records show that Gonzales had been convicted of battery, assault with a deadly weapon, public drunkenness and unlawful sexual intercourse with a minor.
The officer-involved shooting case will be submitted by the police department to the District Attorney's Office for review. The DA's Office reviews all officer-involved shootings. The Sheriff's Department commonly investigates officer-involved shootings.
Anyone with information on the case is asked to contact Detective John Munoz at 909-384-5630 or Sgt. Gary Robertson at 909-841-5361.