Updated

New Jersey's top court sided Tuesday with Gov. Chris Christie in his fight against public-worker unions over pensions, preserving major cuts meant to stave off a budget crisis -- and giving the governor a win as he weighs a Republican presidential bid.

In a 5-2 ruling, the state Supreme Court said there wasn't an enforceable contract to ensure full payments to workers, as unions had argued there was. The court overturned a lower-court judge's order that told the Republican governor and the Democrat-controlled Legislature to work out a way to increase pension contributions for the current fiscal year, which ends June 30.

"That the State must get its financial house in order is plain," Justice Jaynee LaVecchia wrote in the majority opinion. "The need is compelling in respect of the State's ability to honor its compensation commitment to retired employees. But this Court cannot resolve that need in place of the political branches. They will have to deal with one another to forge a solution to the tenuous financial status of New Jersey's pension funding in a way that comports with the strictures of our Constitution."

She noted that the state is obligated to pay individual retirees their pensions. That's not in danger this year, but unions say the funds could start going insolvent within the next decade.

The decision is a boost for Christie at a key time.

"This decision is an important victory not only for our taxpayers who simply cannot afford these unsustainably high costs, but for limited, constitutional government that recognizes the proper role of the executive and legislative branches of government," Christie said in a statement.

One of Christie's signature achievements as governor was a 2011 deal on pensions for public workers. Employees had to pay more and the government was locked into making up for years of skipped or reduced contributions.

The state agreed to escalating payments over seven years. Retirees saw their cost-of-living increases suspended, while current workers had their retirement ages raised as part of the deal.

Last year, state tax revenue unexpectedly came in short of projections, setting off a budget scramble.

Christie, who is considering seeking the Republican presidential nomination, solved it by reducing the planned contributions by more than $2.5 billion over the fiscal 2014 and 2015 budgets. Most of that amount -- nearly $1.6 billion -- is for the current fiscal year. Christie's administration says it intends to put about $200 million in unexpected revenue and nearly $100 million in money that was budgeted this year but is not being spent toward pensions by June 30.

His budget proposal for the fiscal year 2016, which starts July 1, calls for a record $1.3 billion contribution. But even that amount is less than half the $3.1 billion called for in the 2011 deal.

The governor says he has a new plan to reduce health benefit costs and use the savings to stabilize pension funds -- but over a longer time. Current workers would also have their defined benefit plans frozen and replaced with 401(k)-style plans.

In court arguments and filings, Christie's lawyers were in the unusual position of arguing that the pension overhaul the governor signed was unconstitutional -- or at least it was the way the unions that were suing were interpreting it. An attorney general's office lawyer arguing the case said the escalating contributions were "aspirational," a notion that state Senate President Steve Sweeney disputes.

Christie's lawyer also warned that if the court ruled against the administration, it could be setting itself up for getting dragged into many future budget disagreements. The court agreed with that warning in LaVecchia's opinion.

Justice Barry Albin dissented and was joined by Chief Justice Stuart Rabner. "The decision unfairly requires public workers to uphold their end of the law's bargain -- increased weekly deductions from their paychecks to fund their future pensions -- while allowing the State to slip from its binding commitment to make commensurate contributions," Albin wrote. "Thus, public workers continue to pay into a system on its way to insolvency."

While the court fight over pensions is likely over -- unless unions find a way to appeal to the U.S. Supreme Court -- pensions are still a major political and fiscal issue in New Jersey.

Hetty Rosenberg, president of Communication Workers of America in New Jersey, said her members would continue to fight for pension funding.

"It's of course extremely disappointing that the Supreme Court didn't decide the law was exactly what the law said. It's just one obstacle," she said. "We will win, there is no way we will ever, ever give up this fight."

The Associated Press contributed to this report.