San Bernardino police shot and killed a man who set a palm tree on fire and then charged at officers with a large piece of wood, officials said.

The shooting occurred last Wednesday outside a vacant residence just west of downtown, the San Bernardino Police Department said.

Officers responding around 11 p.m. found the tree ablaze and were confronted by a man wielding a "wooden bludgeon," police said.

MICHIGAN MAN DEAD AFTER POLICE SHOOTOUT

The man grabbed a shovel, dropped it, and then picked up another wooden object, which he swung at an officer, according to police.

After the man ignored commands to comply, police unsuccessfully deployed a stun gun and then opened fire, officials said.

Southern CA police shooting

Police in San Bernardino, California, responded to a palm tree that was set on fire and was confronted by a man wielding a wooden object.

CLICK HERE TO GET THE FOX NEWS APP

The man, who was shot and died at the scene, was identified as Delfino Avila, the Southern California News Group reported. His age and city of residence were not immediately available.

Police didn't specify the types of wooden objects Avila allegedly used to threaten officers.

The investigation was ongoing Monday.