The decision gives Democrats a rare victory at the conservative-controlled Supreme Court. A ruling against the law would’ve created fresh uncertainty heading into the November election.

In a surprise decision across ideological lines, the Supreme Court is saving a grace period for ballots received after Election Day.

The court’s ruling means state laws that allow ballots to be received after Election Day can stand.