A bystander accidentally shot by an undercover New York City police officer on Friday afternoon during an illegal firearms sting gone awry has died, the Police Department said on Saturday.

The bystander, identified as Felix Kumi, 61, was shot twice in the torso as the officer fired at a man involved in the botched sting. That man, a 37-year old who was not immediately named, was hit three times and hospitalized in serious condition. Mr. Kumi died early Saturday at Jacobi Medical Center in the Bronx, according to the police.

The New York Police Department said that the episode unfolded around 4 p.m. in Mt. Vernon, N.Y., during an investigation into a suspected illegal firearms dealer.

Detective Michael DeBonis, a spokesman for the department, said the gun dealer was the subject of a “long-term firearms investigation.”