(CNN)Philadelphia police shot and killed a boy Tuesday night after he allegedly shot at four officers, authorities said.
The incident began around 7:20 p.m. in South Philadelphia, where four officers dressed in plainclothes were in an unmarked car on a surveillance assignment, Philadelphia Police Sgt. Eric Gripp said.
The officers saw two boys, a 12-year-old and a 17-year-old, on bicycles and spotted one of them in possession of a handgun, Gripp said. The officers turned on their car's emergency lights and began exiting the vehicle when one of the boys allegedly fired at the officers, Gripp said during a news conference.
The bullet went through the passenger side rear window and embedded in a headrest, Gripp added.
After identifying themselves as police, the officers got out of the car, fired at the alleged shooter and chased them down a street. The officers were not in uniform but wore vests and badges around their neck, Gripp noted.
"At some point, this male was struck in the chest and he dropped his weapon, went down to the ground, officers picked him up, transported him to Penn Presbyterian hospital, but unfortunately, he was pronounced shortly after 7:30 p.m," Gripp said.
The other boy, identified by police as the 17-year-old, was not hurt and taken into custody, authorities said.
One of the officers was hit in the eye with glass when the bullet entered the car and was treated at a hospital, he said.
"We're really lucky that we don't have an officer seriously injured or killed right now," Gripp said.
Two of the four officers fired their weapons during the incident, firing "multiple rounds," Gripp explained. They have been placed on administrative duty as the police department's officer-involved shooting investigations unit reviews the case, he said.
CNN reached out to the Philadelphia Police Department for more information.
This story has been updated with the age of the boy killed by police. He was 12.