A Philadelphia police officer shot a man when he attacked another officer with a screwdriver inside a police district building on Wednesday morning.

A female officer shot the 23-year-old attacker in the torso as he was fighting with two officers attempting to disarm him. The suspect was taken to Temple University Hospital in critical condition, according to FOX 29.

SPEEDING CAR KILLS THREE IN 'REALLY GRUESOME' PHILADELPHIA SUBWAY CRASH

The 39th Philadelphia District declined to comment on the situation to the Washington Examiner.

An officer who was working in the operations room went to speak to the suspect due to not being able to hear the man through a glass window in the room. After opening the secure side door, the suspect lunged into the room and attacked the officer.

Both officers involved in the fight suffered injuries, with the first getting wounded in the back of his head and the second receiving an injury to his elbow. Both officers are expected to recover, police said.

CLICK HERE TO READ MORE FROM THE WASHINGTON EXAMINER

The incident lasted less than a minute from the time the suspect lunged through the door until he was shot.