A police officer shot a man who allegedly punched him in Harlem's Marcus Garvey Park yesterday afternoon.

The unidentified officer was apparently trailing a suspect in the park (where there have been complaints about drug activity) prior to the incident. According to the NYPD, the suspect was following two other men who "were unknown to him," and when he noticed the cop, he "suddenly attacked him." From the police:

The officer struggled with the male and managed to push him away and discharged his pepper spray at him. The officer attempted to handcuff the suspect, who violently resisted and attempted to attack the officer once again. The officer discharged his pepper spray at him a second time and the suspect again grabbed the officer, who discharged his firearm once, striking him in the torso.

The suspect, identified as Daniel Cabrerra, is in stable condition at Harlem Hospital. The officer, who the Times reports is 39 and has been on the force since 2005, was taken to St. Luke's Hospital for facial injuries and tinnitus. Charges against Cabrerra are pending.

Police responding to the shooting at Marcus Garvey Park (David Torres)

A woman who heard the struggle told the Post, "There was a cop up there and there was someone else doing something he wasn’t supposed to do — drugs I think — the cop told him to stop and he wouldn’t stop, and they had a bit of a fight," and WCBS 2's sources say that "the officer spotted two men with some sort of bag, when he was approached by a third man identified as Cabrerra."

A few weeks ago, a man was fatally stabbed in the park.