When bikers surrounded their car and threatened them, Mr. Lien said, he hit the accelerator, running over one of the motorcyclists, Edwin Mieses, and breaking the man’s spine. Scores of bikers gave chase and caught up to Mr. Lien’s car on 178th Street.

The attack was recorded by one motorcyclist’s helmet camera and on an iPad belonging to another biker. In one video, Detective Braszczok can be seen punching the back window of the car, then kicking the side panel twice, just before others dragged Mr. Lien out.

The video, along with a series of photographs, also show Mr. Sims first trying to force Ms. Ng from the car, then walking around the rear end and joining the attack on Mr. Lien, stomping him with his feet. Both men were identified through their helmets and distinctive motorcyclist clothing.

Detective Braszczok never touched Mr. Lien. He testified that he was only trying to stop the car from fleeing an accident and that he did not know the other bikers would attack the driver. He said he reflexively smashed the rear window with his hand after a projectile punched a softball-size hole in it — a projectile he thought had come from inside the car. In that moment, he said he became scared, and a few seconds later fled on his motorcycle, seeing the crowd pummel Mr. Lien as he left.

Outside court, the detective’s lawyer, John Arlia, said Justice Wiley had vindicated his client. “He didn’t intentionally cause any injury to Mr. Lien or to anyone,” he said. “He wishes to move on with his life.”

Before his arrest in 2013, the detective had spent several years as an undercover investigator, working first as a drug purchaser in narcotics investigations, then being assigned to infiltrate the Occupy Wall Street movement.