HANFORD, Calif.—A sheriff’s deputy fatally shot a machete-wielding man Tuesday after he attacked three people in central California, authorities said.

Deputies responding to a call just before 8 a.m. near Hanford found a woman and two men seriously injured. One of the men had a head wound, said Kings County sheriff’s Cmdr. Mark Bevens.

Bevens said the victims were taken to a hospital, but he didn’t immediately know their conditions.

Deputies ordered the suspect to drop the machete but he “continued to advance aggressively toward the deputies,” and one of them fired his gun, Bevens said. The man was shot and died at the scene, he said.

Bevens said the man “was known to law enforcement” but that his identity won’t be released until officials notify his family.

Detectives were working on identifying the victims and determining a motive for the attack, Bevens said.

“Right now, we don’t have any idea why he did what he did,“ he said.