Two other officers were also injured in a car accident while responding to the shooting. All of the officers were either transported to Temple University Hospital or Einstein Medical Centre.
The situation started unfolding around 4.30pm in a section of the city called Nicetown on Wednesday afternoon. Police said a male suspect began shooting from a home in the area.
Footage from ABC6 shows officers lining the street and surrounding a building with their guns drawn as a gunman fired shots at police.
The officers could be seen crouching behind police vehicles on the blocked off street.
Sgt. Eric Gripp tweeted there was at least one suspect firing at police officers.
Local reports described "rapid fire" that took place at least every 20 minutes.
Authorities have taken at least one suspect in custody who they arrested inside the same residence as the shooter while executing a warrant as part of a narcotics investigation.
When officers tried to issue the warrant, a couple of cops ran upstairs but didn't realise the gunman was waiting downstairs.
The gunman reportedly fired an AK-47 through the ceiling, prompting the officers to fire back.
The shooter was moving up and down the interior stairs in the building, shooting into the ceiling and outside the home.
"Many of them had to escape through windows and doors to escape from a barrage of bullets," Philadelphia Police Commissioner Richard Ross said during a news conference.
Two officers became trapped inside the home as the shooter continued to fire. They were held hostage for five hours before being rescued.
Ross said the officers "are trying to get him [gunman] to come out peacefully, but he is refusing to do so".
Police called the man's phone, talked with him on a bullhorn and involved a family member in the negotiations, Ross said, adding that "we are doing everything in our power to get him to come out".
"There's no indication that he's trying to surrender, we do know that he is still alive, there's no question of that because of the shots that keep ringing out," Ross said.
Video shows a massive police presence in a neighbourhood with dozens of police cars and officers, many of them with their guns drawn.
One officer appeared injured and was taken away in a police car. Video also showed two other officers carrying a man and putting them in the back of a police car.
Video showed two other officers carrying a man and putting them in the back of a police car.
Authorities evacuated people from their homes and nearby businesses as they attempt to take control over the situation.
Temple University tweeted that a lockdown "is in effect for Health Sciences Centre Campus".
"Seek shelter. Secure doors. Be silent. Be still. Police are responding," the tweet reads.
More to come