The Florida Supreme Court narrowly endorsed a fundamental change in public employee pensions Thursday by voting 4-3 to uphold a law requiring state workers to contribute to their pensions for the first time.

The Florida Education Association and state police unions sued Governor Rick Scott after he signed a law in 2011 that changed the state retirement system from a noncontributory design to one imposing 3 percent salary contributions and eliminating annual cost-of-living adjustments.