Dayton's willingness to risk a shutdown paid off.

Nothing came easily to the politically divided 2015 Legislature, up to and including its special-session coda. Designed to be a six-bill lawmaking blitz of several hours' duration, the special session spilled from Friday into the wee hours Saturday before finally delivering its prearranged product.

It wasn't pretty. But the special session was worthwhile. Three-plus weeks of negotiation between DFL Gov. Mark Dayton and House GOP leaders on three vetoed spending bills and two others that didn't make it to the regular session's May 18 finish line improved those measures considerably. Together they've sweetened the aftertaste of an otherwise sour year.

The best of the special-session lot is the E-12 education bill, authorizing $17.2 billion for the next two school years, $125 million more than the bill Dayton vetoed on May 21. The additional increment is nicely divided between school districts and preschool opportunities for children from low-income families. It doubles the reach of early learning scholarships to 20,000 children at risk of arriving in kindergarten underprepared, while also doubling state support for school district preschool programs and cutting the Head Start waiting list in half. Dayton also secured a funding boost for American Indian education.

Also improved is the bill authorizing state-funded building projects, which did not beat the clock on May 18. It grew from $100 million to $180 million in general obligation bonds — large enough to include improved labs for avian flu research at the University of Minnesota and a remedy for a costly leak under the Capitol's front steps.

We're less enamored of two other revised bills, one of which — the $780 million agriculture/environment bill — supplied Friday's suspense. While somewhat better than the vetoed version, it still includes several measures that weaken the state's hand in controlling pollution. It faced stiff opposition within the Senate DFL majority, and fell one vote short on its first pass through the Senate. Eight hours later, after an attempt to amend the bill was rejected by the GOP-controlled House, enough votes shifted to give the measure an unenthusiastic 38-29 send-off to Dayton.

Fueling the opposition was a larger complaint about this year's lawmaking. It ended with a final weekend so rushed that some legislators and most observers did not know the full contents of major bills. One of the special session's virtues is the time it allowed for more transparency.

Another was the chance to approve corrections of errors in regular-session bills, including one that would have ended the state auditor's authority to audit county governments on July 1. Without a special session, state government would be obliged to live with those errors at least until March 8, when the next regular session is set to commence.

When state government control is split between two parties, special sessions to complete biennial budget-setting aren't very special. They've been required nine times in the past 30 years. In two of those years, 2005 and 2011, the impasses also forced disruptive shutdowns of state services.

In ordering a do-over on several bills this year, Dayton risked another shutdown, not knowing whether the 2015 Legislature could produce better bills in a timely fashion. It's good to report that his gamble paid off.