TRENTON, N.J. — A ruling issued Tuesday by the New Jersey Supreme Court could cause more than 20,000 drunken driving convictions to be vacated.

The justices unanimously found that criminal charges pending against a state police sergeant made breath-testing device test results from five counties inadmissible as evidence.

Sgt. Marc Dennis was in charge of calibrating the devices, and authorities have alleged that he skipped a required step in the calibration process. Dennis has denied any wrongdoing and has pleaded not guilty to records tampering and other charges.

The court's decision means that as many as 20,667 DWI convictions could now be challenged, according to state authorities and the lawyer for the now-dead plaintiff who brought the case that the court ruled on.

The accusations against Dennis called into question any test result involving a machine he handled, including devices used by local police in Middlesex, Monmouth, Ocean, Somerset, and Union counties between 2008 and 2016.

State authorities have maintained that the step Dennis allegedly skipped was one of several redundancies and fail-safes meant to ensure the readings are accurate. They claim that omitting that one step didn't invalidate the results, noting New Jersey is the only state that requires the step.

The Supreme Court, though, sided with Judge Joseph Lisa, who was appointed as a special master to handle the issue. He found the step omission raised substantial doubts about the reliability of the machines.

As part of their decision, the justices ordered state authorities to notify anyone whose case involved results from machines Dennis calibrated. They must tell them that those results were not scientifically sound, so they can decide whether they want to go to court and seek to have their convictions vacated.