The handcuffed suspect who escaped from an NYPD vehicle following an Upper West Side shooting has been identified as the triggerman and charged with attempted murder, cops said Tuesday.

Ex-con Raymond Johnson, 28, was initially busted for fighting with another man at the scene of the gunfire and tossed into the back of a marked SUV, the NYPD said.

Dramatic cellphone video allegedly shows him slipping through the vehicle’s passenger-side rear window and making a break for it before a cop tackles him in the intersection of West 63rd Street and West End Avenue.

A violent struggle ensued during which Johnson allegedly broke free — and lost one of his shoes — before getting grabbed again and swarmed by a bunch of cops who picked him up and carried him away.

Johnson’s escape from the SUV “is under internal review,” the NYPD said.

Investigation after his arrest revealed that Johnson had previously shot Joshua Wiley, 27, twice in the torso a block north on West End around 4:25 p.m., the NYPD said.

“Witnesses and video evidence led us to him,” according to a source familiar with the case.

After getting shot, Wiley allegedly picked up the gun and fired two rounds, neither of which hit anyone, cops said.

His injuries weren’t considered life-threatening, and he was taken for treatment at NewYork-Presbyterian/Weill Cornell Medical Center.

Wiley was also charged with criminal possession of a weapon and reckless endangerment, cops said.

The gun has yet to be found.

Johnson, who lives at 70 Amsterdam Ave., was charged with attempted murder, assault, criminal possession of a weapon, resisting arrest and escape.

Johnson has 18 prior arrests, sources said, and a pair of convictions for which he spent time in state prison, records show.

In 2010, he was sentenced to up to three years for attempted narcotics sales.

Johnson was paroled in October 2012, but was busted little more than a month later for pair of attacks on the mother of his son, including one in which he bit the woman on her neck.

Despite being slapped with an order of protection. Johnson repeatedly returned to the woman’s home, where he banged on the door and screamed “I want to see my son!” court papers say.

During another incident, he caught her outside her apartment and choked her, court papers say.

Johnson pleaded guilty to criminal contempt of court and was sentenced to up to three years in prison, which was extended to six after he was caught with contraband behind bars, records show.

He was released on parole in June.

Two other men were also arrested at the scene of Monday’s shooting, with Jesse Miranda, 30, charged with assault and Levander Floyd, 29, charged with obstructing government administration and disorderly conduct, cops said.