A police officer in north Texas fatally shot a man at an apartment complex early Tuesday after the man refused to drop a frying pan and cleaver he was holding, officials said.

One officer was stabbed in the melee but officials said the injuries aren't life-threatening.

The officers responded just before 3 a.m. to an apartment complex in Denton, about 35 miles north of Dallas, after several people called 911 to report a man banging on doors and shattering light fixtures in a hallway of the complex, Denton city officials said in a press release.

MINNESOTA POLICE RELEASE BODY CAMERA VIDEO OF DEADLY SHOOTING OF MAN CARRYING KNIFE, CHARGING AT OFFICE

Police used a Taser on the man but it was ineffective, so an officer opened fire, striking the man, the press release said. The man was pronounced dead at a hospital.

CLICK HERE TO GET THE FOX NEWS APP

Officials have not released the names of the officers involved or the man who was killed, but the city said the officer who shot the man had six years of service with the Denton Police Department.