A former lieutenant with the New York Police Department admitted this week in federal court he conspired to bribe city officials into expediting gun licenses for unqualified applicants.

Paul Dean faces up to five years in prison for orchestrating a bribery scheme between at least three dealers and law enforcement officials in the city’s licensing department to fast-track applications for gun permits and overlook certain clients’ violent criminal histories.

“Paul Dean betrayed his duty as a former leader within the New York City Police Department to protect and serve the public,” said U.S. Attorney Geoffrey S. Berman in a news release Thursday. “Instead of assuring the integrity of the License Division he oversaw – a division charged with protecting the public safety by restricting access to firearms – he sought to corrupt it by bribing the very officers once under his command.”

Dean joined the NYPD in 1994 and began serving in the licensing division in 2008, according to court documents. He oversaw the division’s operation from November 2014 until his retirement in January 2016 and held the “ultimate approval” when it came to gun licenses, according to a complaint filed in federal court last year. During his last three years with the unit, Dean admitted he and officers he supervised — including David Villanueva and Richard Ochetal — solicited and accepted bribes from “expediters” Gaetano Valastro, Frank Soohoo, and Alex Lichtenstein.

The officers accepted cash payments, paid vacations, food, liquor, prostitutes and free guns in exchange for fast-tracking gun licenses, often skipping standard protocol — such as conducting applicant interviews to verify supplied information.

Dean retired from the NYPD to join Valastro — a former city cop, himself — in the expediting business, according to court documents. Dean, Valastro and a third retired officer, Robert Espinel, worked together in Valastro’s gun store — Valastro’s International Tactical Academy — to direct expedited applicants to Villanueva and Ochetal, according to the complaint.

In an attempt to corner the expedition market, investigators said Dean and Espinel extorted Soohoo for a larger share of his clientele by threatening to cut off his connections within the NYPD Licensing Division if he didn’t cooperate. Federal authorities arrested Dean, Espinel, and Valastro in April 2017.

Dean’s sentencing is scheduled for December, according to court documents. Sentencing for John Chambers, a fifth NYC expediter convicted in April on similar charges, has been postponed until October. NYPD officials estimate more than 100 gun licenses were fast-tracked through the combined bribery schemes, according to a report from Newsday.