A police officer fatally shot a man who charged at authorities with two swords on Long Island, New York, and the police commissioner said Wednesday that the shooting appeared to be justified.

Alan Weber, 54, was pronounced dead at a hospital after Tuesday night's shooting in Elwood.

Police responded to a 911 call reporting a man acting violently inside a home. Weber was screaming and breaking items when officers arrived and refused to come outside, police said in a statement.

WASHINGTON MAN SHOT DEAD BY ARMED FATHER AT DOG PARK AFTER TRYING TO 'ENDANGER' CHILD'S LIFE: POLICE

Fox News New York graphic

Police in Elwood, New York, have fatally shot a man who charged at the officers with swords.

The Suffolk County officers entered and Weber confronted them with the swords while wearing a fencing mask, Police Commissioner Rodney Harrison said, adding that Weber did not obey commands to drop the swords and an officer shot a stun gun at him but it had no effect.

Weber then charged, and one officer fired several shots, Harrison said. The officer's name was not released.

CLICK HERE TO GET THE FOX NEWS APP

"I feel the officers had no other choice but to use what they had to use to stop the threat," Harrison said.

Neighbors said they had called police earlier in the day when Weber was running around to houses in the neighborhood, trying to open doors and take mail. Police responded but did not take him into custody, they said.

State and local authorities are investigating the shooting. Harrison said he reviewed officers' body camera video and "at this time I believe it's a justified shooting."