The attack came in a year marked by attacks on police in racially charged incidents that followed complaints of police abuse.
The shooter’s motives were not entirely clear, and police have not mentioned the race of anyone involved. Media reports however said that the shooter left a note expressing hatred for police.
“I don’t know what his ideology is or thinking,” Police Commissioner Richard Ross told reporters.
“It’s just a hatred of police officers.” Police said that a man, not yet publicly identified, approached a marked police car late Friday and, without speaking, fired up to 15 shots at Sergeant Sylvia Young, a 19-year veteran of the Philadelphia force.
She was struck repeatedly but may have been saved by her bulletproof vest.
The assailant then fled on foot as police gave chase. He fired into a bar, striking a security guard in the leg, then grabbed a woman to use as a human shield. She too was shot in the leg.
The shooter then fired into a white car, striking its occupants, a man and a woman. She later died; he was in critical condition.
As police closed in on the assailant in an alley, a University of Pennsylvania officer who joined the chace was shot in the legs, but the suspect was killed.
The university officer, identified as Eddie Miller, 56, was hospitalized in stable condition. Officer Young was also listed in stable condition.
Lieutenant John Stanford, a Philadelphia police spokesman, tweeted that the shooting was “#senseless” and “driven by hatred.”
The neighborhood where the shootings occurred is diverse, but predominantly African-American.