A man who punched a cop in Orange County was busted with a little help from a K-9, dramatic new video shows.

Tony Mann, 31, walked to the back of a driveway on Washington Street in Newburgh Sunday, threatening a resident with a folding knife, authorities told The Times Herald-Record.

Resident Randy Martinez, 23, told the paper that Mann was dancing around, making lewd hand gestures and appeared to be on drugs.

“I rolled down the window and was going to tell him he can’t be on my property, and then he takes out his knife, and I’m just like, ‘Oh, God, no. What’s going to happen?’ ” Martinez said Monday.

Martinez, concerned about the safety of his mom, her friend and his aunt who were cooking near the back door, called police, according to the report.

When City of Newburgh K-9 Officer Roman Scuadroni responded with his K-9 Lee, Martinez started filming the encounter.

Scuadroni can be seen trying to talk to Mann, who was still dancing in place.

Then Mann advanced toward Scuadroni and punched him in the face, the clip shows.

That’s when Lee got involved.

Scuadroni opened the back door of the squad car to release Lee, who is shown jumping on the suspect and trying to control his left arm — as his human partner also tried to restrain him.

Mann was arrested and charged with trespassing, a violation, as well as third-degree assault, resisting arrest, obstructing governmental administration and second-degree menacing — all misdemeanors, the Record reported.

Scuadroni suffered minor cuts to his mouth and thumbs — while Mann needed to be hospitalized for intoxication and a minor dog bite from Lee, police told the outlet.

“This is not police brutality,” Martinez posted to Facebook. “They were doing [their] job as this man came into my property and threatened me and my family.”