TRENTON (AP) — New Jersey's top court sided with Gov. Chris Christie on Tuesday in a legal fight with public worker unions over pension funds, sparing a state budget crisis this month but leaving unanswered questions about how the state will pay for the promised pensions as Christie prepares to announce whether he'll run for president.

New Jersey state Senate President Stephen M. Sweeney, D-West Deptford, N.J., holds up a paper that shows planned increases in the amount that public workers must contribute to their pensions under a previous agreement with the Christie administration (AP Photo/Mel Evans)

The state Supreme 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.

A decision in the unions' favor likely would have sparked a contentious scramble to come up with billions of dollars that Christie has repeatedly insisted the state doesn't have, while drawing additional attention to New Jersey's fiscal problems, which Christie's rivals are sure to point to often if he chooses to run.

In a 5-2 ruling, the court said that state constitutional provisions calling for an annual budget process trump a 2011 law requiring high pension contributions from the state.

"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."

LaVecchia also 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 unless changes are made.

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."

Gov. Chris Christie speaks at the Politics and Eggs breakfast meeting at the New Hampshire Institute of Politics at Saint Anselm College in Manchester, N.H. (AP Photo/Jim Cole)

Christie hailed the ruling from a court with which he has had major disagreements in the past.

"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," he said in a statement. He called on lawmakers and unions to join him in solving pension problems "once and for all."

Governors from both political parties have been skipping public employee pension fund contributions or making small ones over the past two decades, creating a major funding shortfall.

One of Christie's major achievements as governor has been the 2011 deal that required workers to pay more and raised retirement ages while also setting up a system for the state to make up for the shortfalls over seven years of escalating contributions. The deal helped burnish Christie's reputation on the national stage and fueled interest in a potential run for the White House in 2012.

But amid an unexpected revenue shortfall last year, Christie reduced the state's contributions by more than half for fiscal 2014 and 2015 and made a similar proposal for the budget that kicks in July 1.

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. Lawmakers and unions have not agreed to that.

While the court fight over pensions could be over pensions are still a major political and fiscal issue in New Jersey.

At a news conference, Steve Sweeney, the Democratic president of the state Senate, blasted both the ruling and Christie's response.

"This is outrageous. I listened to the governor say 'come back to the table,'" Sweeney said. "Who in their right mind would come back to a table and negotiate with someone who didn't keep the first part of the deal?"

Sweeney said that lawmakers expected to adopt a fiscal 2016 budget that fully funds pension contributions and funds it partly by raising taxes on people who earn more than $1 million. Legislators took the same approach last year and Christie used a line-item veto to reduce the contributions and eliminate the tax hike.

“I am deeply disappointed by this decision The continued refusal by the administration to meet the state’s financial obligations does not make the problem go away, it only pushes it down the road and allows it to grow worse and cost more. Each dollar in deferred payment will cost three dollars in the future. The governor is exacerbating the problem," Sweeney said in an emailed statement. “The real issue here is trust. How can we ask workers to come to the table when the governor will not honor his commitments?

Assembly Republican Leader Jon Bramnick, R-Union, Morris and Somerset, praised the decision.

“The Supreme Court decision was one of common sense. The Legislature and the governor can now begin to work on reforms to save the pension system. We must recognize the need to fix our system as stated in the findings of the bipartisan blue ribbon panel," Bramnick said.

Hetty Rosenstein, 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."

State Troopers Fraternal Association President Chris Burgos said union workers plan to petition a federal court to hear the case.

“We intend to move to petition the U.S. Supreme Court to hear this. I think it’s crucial that we do not give up the fight and we’ll have to move up to the highest court in the land. That’s something that we have to do. I have an obligation to my members, not just the active members, but the retirees," Burgos said.

New Jersey Education Association President Wendell Steinhauer responded to the decision, calling Gov. Christie an "abject failure."

“”We’re not sad. We’re not scared. We’re fighting mad and we are fighting hard. Forget about the Court. It ducked its responsibility. Forget the about this governor. He’s an abject failure……He has no credibility and we have no reason to waste one single minute talking with him,” Steinhauer said.

NJ 101.5 Report Kevin McArdle contributed to this report.