The Minnesota Supreme Court has upheld Gov. Mark Dayton’s veto of the budget of the state House and Senate, capping a costly and divisive legal battle between the DFL governor and Republican legislative leaders.

The court ruled Thursday that Dayton was acting within his powers when he line-item vetoed legislative funding during a budget dispute in May. The ruling further said that the legislative branch has access to enough money to continue to function — and that the state Constitution does not authorize the judicial branch to order more funding for the Legislature.

The court did not weigh in on another key question of the dispute: whether Dayton’s veto violated the Constitution by coercing the Legislature. In writing the majority opinion, Chief Justice Lorie Skjerven Gildea said the court did not need to settle that matter because the veto won’t stop the House and Senate from operating until February, when the next legislative session begins.

“We conclude that the Legislature currently has access to at least $26 million and, should the Legislature choose, up to $40 million, in appropriated, unencumbered funds,” Gildea wrote. The decision was 5-1, with only Justice Barry Anderson dissenting. Justice David Stras did not take part in the decision.

Gazelka: ‘I am shocked’

While Dayton quickly praised the ruling as a welcome end to the monthslong saga, stunned GOP legislative leaders blasted both the court’s findings and the governor’s actions. House Speaker Kurt Daudt, R-Crown, pushed back against suggestions that the decision amounted to a win for the governor, saying the matter remained unsettled. Senate Majority Leader Paul Gazelka, R-Nisswa, said the ruling would force the Legislature to take extreme measures to stay in business that could end up harming the state.

“I am shocked at the court’s decision,” Gazelka said. “It puts us in a very difficult spot. It feels like they didn’t really listen to the things that are going on.”

Without a budget, legislative leaders had said they’d be forced to shut down the Senate in December and the House two months later. On Thursday they met to approve emergency funding they say will allow them to carry on through the Feb. 20 start of the next legislative session. The plan shifts about $20 million designated for the Legislative Coordinating Commission, the office that coordinates some core functions of the Legislature, to the House and Senate.

Once the Legislature is back in session, both leaders said their first order of business will be to introduce a budget bill identical to the one Dayton vetoed. But with tempers flaring from last year’s session, Dayton’s veto and now the court’s ruling, members of both parties agreed that the outlook for a productive 2018 session is dim.

“This will be the biggest do-nothing session we’ve ever seen if this environment we’re in between the Legislature and executive branch is still as toxic as it is today on Feb. 20,” said Senate Minority Leader Tom Bakk, DFL-Cook.

While both Daudt and Gazelka said they were open to meeting with Dayton, Daudt said his trust in the governor is low. He called the governor “one of the most partisan” people he has worked with, and offered up a proposal that would block legislative staff from drafting bills for the executive branch, which is typically part of their duties. Though Gazelka worried that such an action could harm Minnesotans by disabling some state government work already in place, a majority of the Legislative Coordinating Commission sided with Daudt.

Daudt said he would also blame the governor if the Legislature ended up unable to make payments on the new Senate office building. State officials have warned that missed payments could prompt ratings agencies to downgrade the state’s bond ratings and cripple its borrowing ability for major projects.

The speaker said he would not be “looking under my couch cushions” to help with that problem.

“Maybe it’s time that this governor understands that there are ramifications for his decisions,” he said.

Dayton: ‘Time for us to agree’

In a statement, Dayton blamed the Legislature for instigating the court dispute, which is likely to cost taxpayers hundreds of thousands of dollars — or more — in legal fees.

The battle dates to the final days of this year’s legislative session when Republicans, who were pushing for a series of tax cuts that Dayton opposed, maneuvered to force the DFL governor to sign off on the cuts by tying them to the budget for the state Department of Revenue.

Dayton signed the tax bill, but then attempted to bring GOP leaders back to the negotiating table on that issue and others by zeroing out the budgets for the House and Senate.

The governor has targeted three tax cuts for repeal or scaling back: ones that benefit wealthy estates, business property owners and smokers. He says failure to do so puts the state on less stable financial footing. He also objects to new teacher licensing standards crafted by Republicans, and a provision that makes it tougher for undocumented immigrants to obtain driver’s licenses.

Instead of renegotiating with Dayton, Republicans sued. A Ramsey County judge took the Legislature’s side, striking down Dayton’s vetoes; but the Supreme Court in September declined to uphold that ruling. The state’s high court instead pushed Dayton and Republican leaders into mediation, but that effort broke up within two days.

Dayton said Thursday that the court’s ruling shows the Legislature erred in challenging his veto.

“The court has also found that the Legislature has access to at least $26 million to continue its full operations until it reconvenes in February. Therefore, there was no need for them to have initiated this lawsuit and imposed its costs on our state,” he said. “It is time for us all to agree that this dispute has been concluded and resume working together for the best interests of Minnesota.”