The justices, by a 6-3 vote, granted an appeal from New York prosecutors who had urged them to undo a federal appeals court decision that overturned the verdict. The three liberal justices dissented.

Prosecutors had been preparing to try the man, Pedro Hernandez, for a third time. His first trial ended in a mistrial.

The unanimous panel of the U.S. Court of Appeals for the Second Circuit reversed Hernandez’ murder and kidnapping conviction in the second trial because of how the judge had answered a question from jurors.

Manhattan District Attorney Alvin Bragg had called the basis for overturning the conviction “a slender reed” that essentially ignored a five-month-long trial with 66 witnesses.

The justices agreed, in an unsigned opinion, that federal courts should not second-guess state courts under a 1996 federal law that was intended to reduce federal court oversight of state criminal trials.