Faced with the possibility of the Senate shutting down this summer and the House closing up shop shortly thereafter, Gov. Mark Dayton empowered his attorney to negotiate to fund the Minnesota Legislature — even as the Legislature is suing him for vetoing its funding.

In an agreement made public Friday afternoon, the governor’s lawyer — former Supreme Court Justice Sam Hanson — and the Legislature’s lawyer — high-profile private attorney Doug Kelley — asked a Ramsey County district judge to order the Legislature funded for a time. The funding would stop the legislative shutdown while the court case goes on.

“It’s not going to throw people out of their jobs and it’s not going to jeopardize the bond rating and the like,” Dayton, a Democrat, told the Pioneer Press. In May, Dayton line-item vetoed the Republican-controlled Legislature’s two-year, $130 million funding in an attempt to get lawmakers to agree to undo some of their tax cuts.

Essentially, the agreement, if approved, would take the sting — and some of the power — out of Dayton’s decision to veto two years’ worth of legislative funding until October or the end of the court case. By then, a court will have decided whether the veto was constitutional, or Republican legislative leaders and the governor may have worked out a deal to restore all the funding.

“This will prevent the voice of Minnesotans from being silenced by the governor’s unconstitutional veto,” said House Speaker Kurt Daudt, a Crown-area Republican. “We’re pleased the governor has recognized the importance of ensuring that Minnesotans continue to have representation in St. Paul.”

In court filings earlier this week, the House and Senate had said they have plans to furlough or lay off all legislative employees if the legal battle is not resolved soon. The House had planned to pay lawmakers’ salaries and housing expenses through the end of August, and the Senate planned to pay for members’ housing expenses through the end of the year.

The Legislature finished its annual session last month. Lawmakers are not due back at the Capitol until late February. But lawmakers argued they need funding year-round.

“Communicating with constituents, both during the regular session and the interim, is a core function of the Legislature,” their filing said. “Legislators rely heavily on legislative staff to facilitate constituent communication year-round.”

The Legislature also claimed it needed year-round assistance to craft next year’s legislation.

Dayton’s legal argument cast doubt on the need for the full complement of staff when the Legislature is not meeting.

But in an interview, the governor, still scarred by the 2011 state government shutdown that saw thousands of public employees furloughed for weeks, said he did not want to keep paychecks from hundreds of legislative staffers because of the political dispute.

The agreement released Friday may hold those staff harmless — at least for a while.

It would also allow the Senate to make lease payments to the state for the new Minnesota Senate Building.

“I hope that this agreement signals the resumption of good-faith negotiations to resolve our policy differences and protect our state’s fiscal integrity,” Dayton said in a statement.

The Friday agreement specifies that the Senate would continue to make its monthly payments to the state for its new office building for as long as the legal dispute takes. Senate Majority Leader Paul Gazelka, R-Nisswa, and court filings had said those payments would stop in June.

Gazelka’s words — and the governor’s veto of legislative funding — made the Standard & Poor’s bond-rating agency worry that the state might not make payments for the Senate building on a timely basis. Fitch and Moody’s rating agencies said they were not worried.

“It would be outside the realm of Fitch’s expectations for the state to not act in a way that ensures full and timely repayment of all its debt,” that agency said.

The agreement between the Legislature and Dayton said that they would jointly seek an “accelerated review” by the Minnesota Supreme Court, no matter what the Ramsey County District Court decides.