ST. PAUL, Minn. (AP) — Democratic Gov. Tim Walz and top legislative leaders reached a bipartisan budget deal Sunday in which the governor dropped his proposed gas tax increase but got to keep most of an expiring tax that helps fund health care programs, Republicans got an income tax cut for middle-class Minnesotans and both sides claimed credit for additional spending on education.

Walz, Republican Senate Majority Leader Paul Gazelka and Democratic House Speaker Melissa Hortman announced the details of the two-year budget totaling around $48 billion with not much more than 24 hours to go before Monday night's adjournment deadline for the regular session. Hortman said at a news conference that they plan to hold a special session to finish their work, probably Thursday, and that she hopes they can keep it to just one day.

The governor pointed out that it was the first time in over a decade that state leaders had reached a bipartisan budget agreement before the session ended, saying they proved that divided government can work. Minnesota is the only state this year where Democrats control one chamber of the Legislature and the GOP controls the other.

"We did something here that in 2019 is a big deal — divided government with vastly different visions and vastly different budgets that came together in a manner that was respectful," the former congressman said, drawing a contrast with the partisan dysfunction in Washington.

Special sessions have become necessary more often than not when control of Minnesota's government is divided The last time lawmakers finished a budget without going into overtime was under Democratic Gov. Mark Dayton in 2013, when Democrats controlled the Legislature.

Gazelka said both sides in a divided government want to win and don't want to lose.

"That's what we have here today. It was a draw and it was good for Minnesota," Gazelka said.

In the end, Walz got none of the 20-cent gas tax increase and related fee increases he wanted to pay for improved roads and bridges, a proposal that was anathema to Republicans, nor did he get a metro sales tax increase for public transit. But Republicans agreed to preserve a tax on health care providers that helps fund Medicaid and other programs, which they wanted to let expire at the end of the year. That tax will dip from 2% to 1.8% instead.

Republicans got a 0.25% reduction in the second-tier income tax bracket starting in 2022, which they said was the state's first permanent income tax cut for the middle class in nearly 20 years, as a benefit of synching the state's tax code with the 2017 federal tax overhaul, which will make tax filing simpler. The GOP also got to keep a reinsurance program for holding down health insurance premiums for another two years. Democrats wanted to replace it with more direct subsidies.

The deal also includes an increase in per-pupil state aid to public school districts of 2 percent in each year of the two-year budget. A panel will be formed to try to identify $100 million in savings from the rapidly growing health and human services budget.

The three leaders directed the conference committees that are still negotiating the big budget measures of the session to finish their work by 5 p.m. Monday and are leaving it up to those panels, working with state agency heads, to figure out the details. But they said all three must agree on the final versions.

Until Sunday night, none of the leaders had said much publicly during the past week about which issues remained unresolved as they struggled to agree on details of the state's next two-year budget. Walz, Gazelka and Hortman maintained what was dubbed a "cone of silence" as the closed-door talks continued.

The governor acknowledged that the negotiations sometimes became "very, very difficult." But he commended Gazelka for listening and trying to understand his position despite their political differences. He also credited Hortman's "dogged determination to drag us back to that table" when things got tough.

More From KROC-AM