Minnesota legislators voted Thursday to restore the House and Senate operating budgets after Gov. Mark Dayton vetoed them in May.

That veto led to a contentious legal battle, but the governor agreed at the end of last year to sign a clean budget bill and move past the debate. Lawmakers now have passed a clean bill that allows them to keep functioning, without any additional provisions.

House Democrats did argue the legislative funding should be linked to new contracts for state employees that include raises over the next couple of years. But Republicans opposed tying the contracts — which legislators rejected last year — to the funding bill.

Instead, they approved a bill that merely restores the funding that had been in last year’s budget bill for legislative operations. That includes $64 million for both the House and Senate over the next two years. The funding would be retroactive to July 1.

“Basically, what we’re doing is a rewind,” Rep. Sarah Anderson, R-Plymouth, said at a conference committee meeting where the bill was approved Wednesday. “This is essentially taking us back to that moment in May 25th and giving us a second opportunity. And it’s clean language as the governor has asked us to do, and hopefully we can all get behind that.”

At the end of last session, Dayton vetoed the Legislature’s funding during budget negotiations in an attempt to get legislators to repeal certain tax cuts and policy provisions.

Legislators sued, saying he was effectively abolishing another branch of state government. The DFL governor and Republican legislative leadership spent half of last year locked in a legal battle.

The Minnesota Supreme Court ended up ruling in Dayton’s favor in November, noting that the Legislature had enough funding to keep operating until the session started this week.

The bill legislators approved did not include funds for any legal costs from the lawsuit, and it is not yet known what that cost will be.

The resentment over Dayton’s veto clearly lingered Thursday. Anderson said she considers it an “embarrassment to Minnesota” that the DFL governor thought he could defund one branch of government.

Senate and House staffers, along with staff in the legislative auditor and revisor’s offices, have been under a lot of stress with the funding for their salaries in jeopardy, said Sen. Mary Kiffmeyer, R-Big Lake.

She and Senate Majority Leader Paul Gazelka, R-Nisswa, urged their colleagues to pass the bill, which they did on a 38-28 vote.

“This is about defending the Senate,” Gazelka said. “We’re running out of time. We’re running out of money, and I don’t see a better time to do it than right now.”

Senate Minority Leader Tom Bakk, DFL-Cook, previously said that he, like House Democrats, would like the bill to be linked to new state employee contracts. However, he did not bring that issue up during Thursday’s vote.

Gazelka said he has had conversations about state employee contracts and told fellow senators the contracts will get done before Easter. House leadership did not make a similar promise.

Rep. Debra Hilstrom, DFL-Brooklyn Center, pleaded with House members to sign off on the contracts. She said state employees are asking to be treated fairly and that legislators should approve the raises that workers had negotiated.