An undercover New York police detective accused of taking part in a motorcycle gang’s assault on a driver on the West Side Highway told his handler in the Police Department the day before the attack that he was joining a citywide motorcycle tour that he expected would cause “mayhem,” the handler testified at a hearing on Tuesday.

The detective, Wojciech Braszczok (pronounced VOY-chek BROOSH-chahk), initially denied that he had been involved in the attack when he first spoke to his handler — two days after the assault, as they met over beers at a restaurant in Midtown Manhattan, the handler, a detective identified in court only by his shield number, testified.

But the witness said that the next day, at a second meeting, Detective Braszczok said he had been present when the victim, Alexian Lien, was dragged from his Range Rover and beaten in September 2013.

At that meeting, which was in Long Island City, Queens, Detective Braszczok told the witness he had seen the other bikers attack the car, heard a loud crack and then took off, without calling the police or intervening. “He said he didn’t have his gun and shield with him and there were too many people and he would have been overwhelmed,” the handler testified, looking at Detective Braszczok from the witness stand.