A city police officer pursuing an armed suspect Tuesday afternoon was fatally shot, the fourth city officer to die in the line of duty in the last year. Another officer was wounded and the suspect was killed.

The officer who died, Patrick McDonald, 30, was shot in the chest, Mayor Michael Nutter said. The other officer, 35-year-old Richard Bowes, was in stable condition and expected to survive after being shot in the leg.

"We are in pain, and we are very angry about what's going on in our city," Nutter said.

Police released only sketchy details about what set off the violence.

McDonald called for backup around 1:45 p.m., and Bowes was one of several officers to respond, police said. At some point, an officer exchanged fire with the suspect.

An automatic weapon was recovered at the scene. Police did not identify the suspect. His body was found about a half block from where McDonald was shot.

Nutter said it is difficult to understand what is going on in the minds of those who have been confronting Philadelphia police.

"Somehow they believe they can engage in gunshots with us," he said.

The shooting happened on a narrow street in a residential area of North Philadelphia, a few blocks from Temple University's campus.

Georgia Phillips, 62, who lives in rowhouse less than a block from where the suspect died, said she heard three or four shots, ran outside and saw police officers running down the street.

Earlier this month, Philadelphia police mourned the loss of one of their own in a funeral Mass in the city's cathedral. Officer Isabel Nazario died during a vehicle pursuit when the patrol car in which she was riding was broadsided by a teenager driving a stolen SUV.

In May, Officer Stephen Liczbinski, 39, was fatally shot responding to a bank robbery. In October, Officer Chuck Cassidy, 54, was fatally shot when he interrupted a robbery at a Dunkin' Donuts.