(Reuters) - Minnesota Governor Mark Dayton’s May 30 veto of funding for the state legislature was unconstitutional, according to a state judge, who voided the action on Wednesday.

Ramsey County District Court Chief Judge John Guthmann ruled the Democratic governor’s line-item veto of fiscal 2018-2019 legislative appropriations violated the state constitution’s separation of powers clause.

Lawmakers sued Dayton last month claiming his veto of nearly $130 million for the Republican-controlled legislature in the two-year budget was unconstitutional. In late June, the judge ordered funding to resume temporarily, pending the outcome of the litigation.

“Today the court ruled an entire branch of government cannot be eliminated by a stroke of the governor’s pen,” Senate Majority Leader Paul Gazelka, a Republican, said in a statement.

He urged Dayton to accept the verdict. But the governor said he will appeal the ruling to the Minnesota Supreme Court.

“As I have said, the tax bill passed last May by Republican legislators jeopardizes Minnesota’s structurally balanced budget in the future,” Dayton said in a statement.

The governor took the veto action in an effort to win concessions from Republican lawmakers on taxes and other measures.

Guthmann concluded it was improper for the governor to use his line-item veto authority “to gain a repeal or modification of unrelated policy legislation by effectively eliminating a co-equal branch of government.”

Dayton’s veto also raised credit concerns for the state by leaving $80.1 million of certificates of participation issued in 2014 for a Senate office facility without an appropriation for rental and debt payments next due in November and December.

After the judge ordered funding to resume, S&P on June 30 affirmed Minnesota’s AA-plus rating and removed it from a watch list for a potential downgrade.