New video shows a man fighting with two NYPD cops — and throwing a punch at one — before he and a pal got clubbed by officers in Washington Heights.

The grainy, 25-second clip, obtained by The Post on Thursday, captured the moments before a bystander shot cellphone video of the cops using batons to beat Aaron Grissom, 36, and Sydney Williams, 37.

The recording emerged as local residents described the men as persistent neighborhood troublemakers and records revealed that they’ve been arrested together at least three times.

Last month they allegedly vowed vengeance against one of the cops in the Tuesday incident, which is under investigation by the NYPD.

The new video, recorded by an overhead surveillance camera, shows Grissom grapple with both cops in a crosswalk, then advance south on Broadway as he struggles with one officer at West 169th Street.

Williams moves toward the fray before the action is hidden by a street sign, but when the men emerge on the other side, Grissom shoves the cop away and swings his right fist overhead toward him.

The two officers — identified by sources as Bramlin Rosa, 32, and Jeffrey Mota, 33 — then square off, snapping open collapsible batons as they advance north and hit Williams, prompting Grissom to lunge forward and attack one cop.

Michael Gonzalez, 32, who shot the original video and lives nearby, has told The Post that his video shows “the cops being aggressive, when they were just defending themselves.”

Grissom and Williams were both arrested following the Tuesday afternoon incident and charged with felony assault on a police officer, resisting arrest, menacing, disorderly conduct and loitering.

NYPD Chief of Department Terence Monahan tweeted Thursday night that while charges against Williams were being “unfortunately deferred,” Grissom would be prosecuted for assault.

They had yet to appear in Manhattan Criminal Court for arraignment as of Thursday evening.

Locals in Washington Heights said the men were among a group of vagrants who hang out in front of a vacant diner and have been plaguing the neighborhood for several months.

A waiter at Coogan’s bar and grill, near the scene of Tuesday’s incident, said he recently saw Grissom sexually harass a female passer-by.

“He’s all up in people’s faces,” the worker said. “He’s very disrespectful.”

Jovanni Gordils, 30, who hands out flyers for local businesses, said he saw Williams apparently smoking synthetic marijuana, known as “K2,” inside the 168th St. subway station in November.

“I know because that s–t stinks,” the Bronx resident said.

A Broadway street vendor said Grissom and Williams used to hang out in a nearby park until barricades were erected.

“They’re always together,” the vendor said.

In addition to Tuesday’s incident, both men were arrested inside the 168th St. station on Dec. 5, with Rosa allegedly seizing 14 zipper bags of K2 from Williams.

Court papers say the men threatened the arresting officers, saying, “We are going to get you. You’re going to get what’s coming to you.”

Grissom and Williams currently have a suit pending in Manhattan Supreme Court that claims they were falsely arrested after cops ejected Williams from an East Harlem pizzeria on St. Patrick’s Day 2016.

Last year, Grissom scored a $7,400 settlement from the city over a federal civil-rights suit that claimed he suffered a broken rib when cops arrested him at a Bronx homeless shelter.

Additional reporting by Rebecca Rosenberg