Police say it all started before 3:00 a.m. Monday after the suspect fired one shot inside the lobby of Blumberg Homes in the 1500 block of Judson Street in North Philadelphia.
The circumstances that led to the gunfire were not immediately clear. No one was hurt.
Philadelphia Housing Authority police responded to the reported gunfire and began to chase the suspect and another person, described as a person of interest, on foot.
The officers called for backup, and Philadelphia Police converged on the scene along with at least one FBI agent.
Lawmen finally caught up with the suspect in a vacant lot in the 4100 block of Stewart Street.
They say the suspect pointed a semiautomatic handgun at them and fired a shot.
That's when one Philadelphia officer, two housing officers, and an FBI agent opened fire, hitting the suspect four times.
He collapsed and dropped the handgun. The person of interest fled the scene.
The suspect was rushed to an area hospital where he is listed in critical condition.
The whole exchange left area residents shaken. Faatimah Stafford lives nearby and told Action News she was rousted from her bed by what sounded like a dozen gunshots.
"I had to run and check on my kids to make sure they were all right," she said.
Police believe the suspect may have been involved in a homicide Sunday morning in the 2900 block of Ridge Avenue in Strawberry Mansion.
Investigators say several factors, including surveillance video from that scene, appear to link the suspect to that murder.
Police are still looking for the person of interest in Monday morning's foot chase.