Prosecutors first laid out how on that Saturday morning around 4 a.m., Mr. Bell was leaving Club Kalua in Jamaica, Queens, where he had been celebrating his impending wedding  scheduled for later in the day  with childhood friends and his father. The detectives were working undercover to make arrests at the club for prostitution or drugs. The two groups may never have noticed each other if not for a testy exchange between Mr. Bell and another man outside the front door.

Prosecutors said Mr. Bell exchanged words with a man standing near a black sport utility vehicle who had “muttered his unhappiness” that Mr. Bell was drunk “and was overheard,” Mr. Testagrossa said. But he said the conversation never escalated and ended without incident. “Not a single blow was thrown, and no gun was displayed.”

The detectives saw the confrontation and decided to follow Mr. Bell. They have said that they believed some of the men with Mr. Bell were armed. Detective Isnora trailed Mr. Bell and two of his friends, Joseph Guzman and Trent Benefield, to their car, which was parked around the corner from the club, on Liverpool Street. He did not call for backup as he approached the men, as is standard in undercover operations, Mr. Testagrossa said, and his communication with his team was lax.

Detective Isnora has said that he pinned his police shield to his collar, but Mr. Testagrossa said it may not have been visible to Mr. Bell and his friends, and that rather than shouts of “Police!” witnesses said they heard the detective say, “Yo, let me holler at you.”

By that time, the three men were in the car. Mr. Bell drove forward, striking the detective’s leg before hitting an unmarked van carrying Detective Oliver and another detective, who was not charged in the case. Mr. Bell then reversed, hitting a wall before speeding forward and hitting the van again.

Mr. Testagrossa said Mr. Guzman looked at the detective and saw only a man with a gun, and felt a bullet tear into his shoulder before he shouted, “Let’s do it!” to Mr. Bell, urging him to flee.

Mr. Testagrossa said Detective Oliver began shooting after Detective Isnora, firing 31 shots, with the briefest of pauses to reload. “Had he paused to reassess, he would have discovered that no gunfire was coming from the occupants of the vehicle,” the prosecutor said.