TROY, N.Y. (AP) — Two former upstate New York police officers have pleaded guilty to covering up their illegal entry into an apartment as part of a drug search.

The Times Union reports a judge sentenced former Sgt. Ron Epstein and former Detective John Comitale Jr. to conditional discharges Tuesday, meaning they can avoid jail time if they stay out of trouble.

Epstein pleaded guilty to official misconduct and Comitale pleaded guilty to attempted official misconduct after prosecutors say they forged an incident report to hide the unit's search of an apartment in Troy without a warrant in 2017.

The resulting scandal led to the disbanding of the city's undercover drug unit.

Special prosecutor Paul Czajka says the judge's ruling ends a "sad chapter" in the police department's history.

More From WIBX 950