Warning: Graphic Content

A cop was stripped of his gun and badge Friday after a shocking video of him pointing the weapon at bystanders during an arrest in Harlem was posted on Instagram.

The unidentified cop is seen on the footage wrestling Dayshawn Bettway, 21, to the ground inside a public housing building on St. Nicholas Avenue at around 6:40 p.m. Thursday.

A person standing near the scuffle was filming the arrest when the officer, grappling with the suspect on the ground, slowly pulls the firearm from his holster and aims it directly at the camera.

“Back up!” the officer screams as the camera suddenly jolts.

“Back! Up!” he demands again as the video cuts out.

Another clip shows the officer leaving the building, where he encounters Jahnico Harvey, 19, and clocks him in the head before wrestling him to the ground.

Cops said they did not immediately know what provoked the punch.

The violence began when two men riding dirt bikes began circling two cops trying to ticket the driver of a double-parked car outside the housing project.

The officers then turned their attention to the dirt bikers and the double-parked 2015 gray Hyundai drove off.

A sergeant and police officer from the 32nd Precinct then responded and followed one of the two bikers, Bettway, who ran into a project building.

After the altercations seen on camera, Bettway was arrested and charged with assault, reckless endangerment, obstruction of government administration and resisting arrest. He was arraigned Friday night and freed without bail.

Harvey also was arrested and charged with menacing and disorderly conduct.

He was issued a desk appearance ticket.

The Hyundai was later found nearby with marijuana and 25 rounds of live ammunition inside, cops said. They also discovered the vehicle had been stolen in Connecticut.

The two people who were inside the car had fled.

The video was uploaded by a user named Roland Stone.

“AND THE NYPD IS WASTING ALL OUR TAX DOLLARS ON CRUSHING BIKES, Who’s really the bad guy ???” he wrote in the caption, apparently referring to police using a bulldozer earlier this week to crush seized ATVs and illegal dirt bikes.

The Instagram user wrote that Harvey had just returned from college.

A police spokeswoman said the Internal Affairs Bureau is investigating.