NEW YORK (CBSNewYork) – A Rockville Centre officer who faced assault charges in connection with a violent arrest outside a bar was cleared of all charges Tuesday.

Cellphone video showed Officer Anthony Federico in an altercation with brothers Kevin and Brendan Kavanagh back in May 2016.

“He was on patrol that night, went to investigate a disturbance, and was attacked and defended himself,” Police Commissioner Charles Gennario said when Federico’s trial began in January.

Federico had been adamant about his innocence, saying he was responding to a bar brawl alone and pounced on by violent drunks.

He was stoic and silent after being cleared of the allegations Tuesday, CBS2’s Carolyn Gusoff reported. Meanwhile, cops who packed the courtroom erupted in applause.

Defense attorney William Petrillo called the prosecution ill-advised in a case that may now cause officers to hesitate to act in dangerous situations.

“Anthony Federico is a great police officer and a great person, and his whole life has been uprooted and his world has been turned inside out and upside down,” he said.

The defense claimed the cellphone video didn’t tell the whole story. Petrillo said Federico was first hit in the face, then kicked and grabbed by a drunken and drugged Kevin Kavanagh and his brother while a female friend hurled slurs and curses.

Federico used his Taser repeatedly before hitting Kevin in the head with the device, prosecutors said. Kevin required sutures and staples to close the gash in his head.

The trial was a bench trial: A judge rendered the verdict.

Federico faced charges of assault and falsifying a police report and could’ve faced up to seven years in prison if convicted.

A spokesperson for Nassau County District Attorney Madeline Singas said in a statement, while they disagree with the verdict, they respect the judge’s decision.

“We respect the judge’s verdict just as we respected the Grand Jury’s decision to indict after it reviewed the video and evidence. Our office will continue to enforce the law and seek justice without fear or favor,” the statement read.

Federico will be back on patrol as soon as he’s ready, the commissioner said.

The Kavanagh brothers are suing the Village of Rockville Centre and its police department for $5 million each.