SANTA FE, N.M. — The state can trim pension benefits for retired government workers to improve the long-term finances of public employee retirement programs, New Mexico's highest court ruled Thursday.

The Supreme Court's unanimous decision was a victory for lawmakers and Gov. Susana Martinez, who agreed earlier this year on measures to overhaul pension plans for nearly 70,000 current retirees — one for educators and another for state and local government workers.

The court ruled against retired educators who sued to stop pension administrators from reducing annual inflation adjustments for current retirees and workers who are eligible to retire but remain on the job.

The court acknowledged in its ruling that the case "casts a long shadow" given that the outcome potentially affects a substantial number of New Mexico's retiree population as well as the health of the public treasury and future obligations for taxpayers.

In the opinion, Justice Richard C. Bosson wrote that the state constitution does not afford retirees a right to an annual cost-of-living adjustment, based on the formula that was in effect at the time of their retirement, for the entire time they receive benefits.

The retirees had argued that retired educators have a "vested property right" in their pensions and are entitled to the cost-of-living adjustments previously promised, which would have been 2 percent this year without the change in law.

Jan Goodwin, executive director of the Educational Retirement Board, said Thursday the ruling gives the state more flexibility.

"It means the Legislature does have the ability to make changes in the COLA. That's a huge tool to improve our sustainability," she said.

A message seeking comment from the retirees' attorney was not immediately returned Thursday.

The educational retirement plan covers about 40,000 retirees and more than 61,000 active workers.

Current retirees saw their pensions go up by either 1.6 percent or 1.8 percent after the cuts were implemented in July, instead of the 2 percent they would have otherwise received.

The Legislature approved a separate measure this year that reduced inflation adjustments for pensions under the Public Employees Retirement Association, which covers nearly 90,000 state and local government workers, including about 31,000 retirees.