The U.S. Supreme Court struck down California’s sentencing law Monday, reaffirming limits on judges’ discretion and presaging shorter sentences for thousands of state prisoners.

The 6-3 ruling effectively shaves four years off the 16-year sentence of former police officer John Cunningham, who was convicted of sexually abusing his son.