NEW YORK -- A New York City police officer shown on video pointing his gun at a bystander who was filming a police encounter has been stripped of his gun and badge.

The incident happened Thursday at a public housing complex in Manhattan's Harlem neighborhood.

A video posted on Facebook shows two officers struggling with a man on the floor when one of them orders bystanders to move back. The video shows the officer then pulling out his gun and shouting, "I'm not playing."

Get Breaking News Delivered to Your Inbox

Ronnie Pinkerton Jr. was in the crowd that witnessed the incident. He told CBS New York the crowd believed the officer was using excessive force.

"He has him in a headlock between his legs, so his head is in between his legs, and he's kind of like squeezing, so as he's doing that, he's telling us to back up. But you're overreacting, you're using too much physical strength on him, so we're telling him ... 'You're bugging out,'" Pinkerton said. "So he pulled out his gun. He says, 'Back up! Back up! Back up!'"

Police said the man had been resisting arrest after riding an illegal dirt bike and fleeing from police.

Another video shows the same officer later punching another man in the face before arresting him.

Police said that man, 19-year-old Jahnico Harvey, was arrested for menacing and disorderly conduct, CBS New York reports.

A police spokesman says internal affairs investigators are probing the incidents.