"There is a security incident on the Benjamin Franklin Parkway," emergency authorities said, referring to the shooting.

Both officers were in stable condition, CBS3 Philadelphia said, citing the police department. Police were searching for the shooter.

Video cited by local media showed people running from the Benjamin Franklin Parkway.

Police instructed people in surrounding buildings to shelter in place.

"I didn't hear the shots, but the cops were like, 'Run, run, run,'" one woman told an NBC affiliate.

Earlier in the day in the Chicago suburb of Highland Park, a gunman on a rooftop opened fire on families waving flags and children riding bikes at a Fourth of July parade, killing six and wounding more than 36.

(Reporting by Kanishka Singh in Washington; Editing by Kim Coghill)