“I don’t know what he was thinking” Mr. Gonzalez said. “What did he think, the officer was going to back away?”

In the video, the shaven-headed officer flicks open an extendable baton and strikes Mr. Williams, the shorter of the two men, twice over the head. Another officer wearing a watch cap takes a backhanded swing at Mr. Williams, striking him in the face.

A woman off-camera can be heard saying in Spanish, “They were telling them to move away from there, and they didn’t want to. The two of them squared with the police.”

The video shows Mr. Grissom chasing one of the officers down 169th Street; they grapple and fall to the ground. Other uniformed and plainclothes officers rush to join the fight, kicking and striking Mr. Grissom with fists and batons.

One baton strike appears to catch Mr. Grissom flush in the face, dazing him, the video shows. The shaven-headed officer strikes Mr. Grissom multiple times with a baton while he is pinned to the ground. One of the plainclothes officers can be seen repeatedly kicking Mr. Grissom in the torso.

Police officials confirmed that two detectives and an off-duty police officer came to the assistance of the two transit officers. The Police Department did not identify the officers involved. None have been placed on modified duty.

Mr. Grissom and Mr. Williams were arrested at least once before, on Dec. 5, in an attack on two transit officers. The officers had told them not to loiter in the mezzanine area in the same station, court records show.