Police fatally shot a man who stabbed two female security guards and refused officers’ commands to drop a knife in the Bronx Monday night, the NYPD said.

The officers were responding to a call of an assault in a halfway house on Hughes Avenue, near East 178th Street, NYPD Chief of Patrol Terence Monahan said at a news conference. They found the man, identified by police as Cornell Lockhart, inside the lobby carrying a knife, Monahan said.

The officers commanded him more than 20 times to drop the weapon, but he instead stepped toward them with the knife in hand, Monahan said.

“At that point, both officers discharged their weapons, striking the suspect multiple times,” he said.

Lockhart was taken to St. Barnabas Hospital, where he was pronounced dead.

Police then reviewed surveillance camera footage from the building and determined he had stabbed the security guards before officers arrived, Monahan said.

One of the women was stabbed in the left arm, while the other was stabbed in the chest and arm. Both were taken to St. Barnabas Hospital, where they were in stable condition Tuesday morning. Monahan described the weapon as a 4-inch steak knife.

The stabbings and shooting took place in the Hughes House, a single-room-occupancy building run by Urban Pathways, which provides housing to homeless people with mental illnesses.

Responding officers were wearing body cameras and the footage will be reviewed as part of the investigation, Monahan said.

No officers were injured, police said.

With Alison Fox