SAN FRANCISCO — The California Supreme Court on Monday upheld a decision by state lawmakers to roll back one way for public workers to pad their pensions, but avoided ruling on the larger issue of whether retirement benefits can be taken away once promised.

At issue in the unanimous decision was a provision of a 2012 pension reform law that ended the ability of public workers to pay for more years of service for a more lucrative pension when they retire. The law, backed by former Gov. Jerry Brown, sought to rein in costs and end practices viewed as abuses of the system.

Attorneys for a union argued that the elimination of additional retirement service credits violated a long line of California court rulings that have made pension benefits for existing employees sacrosanct. Those court decisions established the “California Rule,” which says workers enter a contract with their employer on their first day of work that entitles them to retirement benefits that can never be diminished unless replaced with similar benefits.

Critics of the rule, along with employee unions, were keeping a close eye on the case because it had the potential to upend the California Rule. But the justices sidestepped the issue by ruling that additional retirement service credits were not “core pension rights” that lawmakers were contractually bound to honor.

“In the absence of constitutional protection, the opportunity to purchase ARS credit could be altered or eliminated at the discretion of the Legislature” and the court had “no occasion in this decision to address, let alone to alter, the continued application of the California Rule,” Chief Justice Tani Cantil-Sakauye wrote in an opinion joined by the six other justices.

A group representing public employee unions downplayed the court’s decision to uphold the elimination of retirement service credits.

“The decision was not unexpected,” Ted Toppin, chairman of Californians for Retirement Security, said in a statement. The group had filed a brief in the case. “More importantly, the Supreme Court leaves intact the California Rule, holding that vested benefits cannot be impaired.”

The opinion was balanced and showed no inclination on the part of the court to repudiate the California Rule in any future decisions, said Gregg McLean Adam, an attorney for the union representing state firefighters that challenged the elimination of service credits.

“I don’t see anything in this decision that suggests that the court wants to make a radical break from the last 70 years of California law,” he said.

The California Rule gives workers security that their retirement will be safe and predictable after a career in public service. But it also ties lawmakers’ hands in responding to exploding pension costs — a problem for the state, cities, counties, schools, fire districts and other local bodies.

Roughly a dozen states observe a variation of the California Rule, so a decision to alter it could have implications beyond California.

Pension reform advocates blasted the court for failing to address the rule.

“We’re disappointed that the liberal California Supreme Court once again is serving as a barrier to common-sense reform of unsustainable and indefensible gold-plated government pension payouts,” Carl DeMaio, chairman of Reform California, said in a statement. “These government pension abuses must be reformed or California taxpayers will face a future of higher taxes, fewer services, and bankruptcy in our cities and school districts.”

The justices said the ability to purchase additional years of service, unlike traditional pension benefits, was optional and not a form of deferred compensation tied to the amount of a time an employee works. The court equated service credits to other “optional benefits” such as health care and life insurance.

“We have never suggested that this type of benefit is entitled to protection under the contract clause,” Cantil-Sakauye said.

The justices are considering several other pension cases, so they may address the California Rule in another case.