MINEOLA, NY (PIX11) — A former NYPD officer with a history of controversial arrests was sentenced Thursday to up to four years in prison for firing several shots into the ocean in Long Beach.

David Afanador, 41, was drinking when he fired into the Atlantic Ocean in March of 2021. At the time, he’d been suspended from the NYPD after he was charged with putting a Black man in a banned chokehold. He was placed on restricted assignment and was not authorized to carry a gun.

“This defendant knew he could not legally possess a firearm, but still made the decision to drink with friends on a beach and recklessly fire a loaded gun several times into the ocean,” Nassau County District Attorney Anne Donnelly. “Afanador’s behavior was foolish, dangerous, and illegal. We hope that his sentence sends a message to anyone thinking about illegally discharging a weapon in Nassau County in the name of fun.”

Afanador resigned from the NYPD in June 2021. He pleaded guilty to a charge of criminal possession of a firearm on March 22. He was sentenced Thursday to 1 1/3 – 4 years in prison.

A Queens grand jury previously declined to indict Afanador in the chokehold case. He was acquitted In 2016 on charges he pistol-whipped a 16-year-old boy during a Brooklyn marijuana bust, breaking two of the teen’s teeth. Afanador also had eight Civilian Complaint Review Board complaints filed against him, including for using excessive force and denying medical attention.