Startling video shows a man making a mad dash for freedom after slipping through the open window of an NYPD vehicle on Monday afternoon – only to get tackled by a cop in the middle of an Upper West Side intersection.

The handcuffed suspect then managed to shake off the cop during a violent struggle in the street – losing one of his shoes in the process – before getting grabbed again and swarmed by other officers, according to cellphone video posted on Facebook by WABC-TV’s Eyewitness News.

The video also shows the cop who fought with the man picking up a knife from the pavement following their the struggle.

The wild scene unfolded at the corner of West 63rd Street and West End Avenue, outside the Amsterdam Houses, following a shooting a block north on West End around 4:25 p.m., sources said.

The unidentified man was handcuffed and tossed into the rear of a police SUV for allegedly interfered with officers who were treating the victim for two shots to the torso, sources said.

The suspect, who was going to be charged with obstructing governmental administration, somehow “got his cuffs in front of him” while sitting in the vehicle, a source said.

NYPD cruisers have window controls in the back seat, and it’s up to officers to remember to engage rear-window locks before putting suspects in vehicles, sources said.

The NYPD’s 20th Precinct tweeted Monday night that the knife at scene had been seized from the suspect earlier and was accidentally dropped while “the officer was safeguarding it.”

“The whole thing is on bodyworn camera, which we have reviewed,” the precinct added.

Sources had previously said that the suspect had the knife on him during the fight.

The shooting victim, Joshua Wiley, 27, was taken to NewYork-Presbyterian/Weill Cornell Medical Center, where he’s expected to survive, sources said.

Cops were searching for the shooter.

Additional reporting by Larry Celona