A New Hampshire high school student who video recorded a police officer smashing his friend’s head against a table was ordered to delete the footage.

But Mike, a 17-year-old junior at West High School in Manchester, was savvy enough to delete a couple of photos without deleting the video.

He then gave the video to Cop Block, who posted it online along with video interviews of Mike and his friend Frank, the student who was abused by the cop.

The incident took place Monday in the school cafeteria after Mike noticed Frank being questioned by Manchester police detective Murphy, who is the school’s resource officer.

Frank had taken his sister’s purse in a typical display of sibling horseplay, which drew the attention of the officer and an assistant principal.

The officer took the purse from Frank, who then handed it to the assistant principal, who began rummaging through it.

One of them told Frank he was suspended, which prompted him to ask, “why the fuck am I suspended?”

That prompted Detective Murphy to grab him and slam his head against the table.

Meanwhile, Mike was confronted by a teacher for recording the incident.

“You’re recording something you’re not supposed to be recording,” she told him.

Mike firmly stood up for his rights and continued recording.

Frank was jailed on charges of disorderly conduct and resisting arrest.