It happened around 8:30 p.m. along the 2000 block of East Somerset Street.
Police say 24th district officers responded to a report of a person with a gun.
As officers arrived to the area, they spotted three males fitting the description in a gray Honda.
Police attempted to stop the car but the men, in their attempt to flee, struck the police cruiser.
The teens attempted to bail from the car with at least one of them firing at police.
One of the officers returned fire, striking all three teens.
One bolted out of the car, while the other two, ages 16 and 18, were captured by police.
The 16-year-old was shot in the face. The 18-year-old was shot in the lower leg.
The two were rushed to Temple University Hospital for treatment. Both are stable and expected to recover.
The third teen made his way to a grassy area about 5 blocks away, but was caught with the help of a canine unit in the area of the 2700 block of Frankford Avenue. He was also taken to Temple for treatment after being grazed in the shoulder.
"Just the fact that you have 3 suspects carrying a handgun in a stolen vehicle just goes to show what types of individuals these are, they don't have any regard for the law," Philadelphia Police Chief Inspector Scott Small said.
The gun used by the suspects was recovered.