Three hours into the standoff, Philadelphia Police said all of the wounded officers were in stable condition with non-life-threatening injuries, according to presstv.ir.
Police were serving a drugs warrant at a north Philadelphia home at around 4:30 p.m. when the male shooter entered the house and opened fire on the officers.
"Many of them had to escape through windows and doors to escape from a barrage of bullets," Philadelphia Police Commissioner Richard Ross told a news conference.
The shooter continued to fire on a SWAT truck parked outside the residence in the Nicetown-Tiago neighborhood as officers tried to negotiate his surrender, Ross said.
Police called the man's phone, talked with him on a bullhorn and involved a family member in the negotiations, Ross added.
"I'm worried about a potential hostage situation and we've got to get that resolved," said Ross, adding that he believed the two officers trapped inside the home were not wounded.
"We are trying to get him to come out peacefully," Ross said, declining to confirm whether there was more than one shooter. "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."
Police told local residents to remain inside their homes and stay out of the area after hundreds of rounds were exchanged.
Local television station Fox 29 reported some kind of movement by police around 7:30 p.m. when a large bang was heard.
Two other officers were also injured in a car accident while responding to the shooting.
There were reports the shooter was livestreaming the incident on Facebook.
President Donald Trump has been briefed on the shooting and was monitoring the situation, the White House said.
Local media reported the shooter appeared to have a high-powered weapon and a significant amount of ammunition. The incident follows a string of mass shootings in California, Texas and Ohio in which gunmen used semi-automatic rifles.
"I'm a little bit angry about someone having all that weaponry and all that firepower, but we'll get to that another day," said Mayor Jim Kenney after visiting three of the wounded officers in hospital.