Police arrested two of the vagrants who were caught on video trying to attack an NYPD cop in a wild melee in a Chinatown subway station, authorities said.

Eliseo Alvarez, 36, was hit with attempted assault, riot, menacing, attempted criminal possession of a weapon and obstructing governmental administration charges, cops said.

Juan Nunez, 27, was busted on obstructing governmental administration and riot charges.

Nunez and Alvarez were among a group of homeless men who sparred with an NYPD cop at the East Broadway subway station on Saturday night, cops said.

During the caught-on-video melee, the group of five homeless men approach the cop and flail their arms at him. The cop responds by kicking two of them to the ground, the video shows.

Two other men try to hold the group back from the cop, but one of the homeless men ducks underneath his arm, loses his footing and tumbles off the platform and onto the train tracks, the video shows.

The five drifters were originally not charged with any crimes and cut loose on Monday night.

After an outcry by union officials and others, the NYPD announced it would arrest and charge the vagrants for the attack.