The trick with divided government is being able to make a deal after a long day of dropping bombs on each other.

Failure to pull that off has made Washington dysfunctional at least since 2010, and early signs indicated that Augusta, with a Republican governor and Democratic Legislature for the first time in almost 20 years, might be heading in the same direction.

But by the time Gov. LePage got up to testify at a public hearing Monday on his bill to pay past hospital debt with money from a renegotiated liquor contract — the bill that prompted him to threaten to veto all other legislation that crossed his desk until it was enacted — the outline of a workable deal began to take shape.

Democratic leaders announced their alternative to his proposal. Like the governor, they would use money from the liquor contract to pay off the hospitals, but instead of having the state borrow money and pay it back with liquor revenue, the Democrats would demand a one-time payment from the winning bidder in a liquor contract auction.

This was a major concession by the Democrats, who before Monday had been saying that the question of the liquor contract should be resolved separately from the issue of the hospital debt.

Their step back is an unspoken acknowledgment that LePage won the message war and successfully married the two issues. While it makes some sense to consider the liquor contract and hospital debt separately, it would not be possible politically.

Now the only real issue separating the two sides is whether the state will borrow the money or whether the liquor contractor would take out the loan.

But the Democrats did more than step back. They rightly point out that the reason the debt accumulated was not the cost of the state programs, but the high cost of health care generally.

Paying off the debt incurred under the old system is the right occasion to push through health care payment reforms that would prevent the state from ringing up so much debt in the future.

The governor’s approach — cutting people off health insurance in the name of reform — is not working. A better approach would be reducing costs by providing coverage to more Mainers so they seek care in the doctor’s office, not an emergency room.

The biggest reform would be for the state to expand Medicaid eligibility to the standards of the Affordable Care Act, which would bring millions in federal funds to the state.

This would require an about-face by the governor, who said back in November that Maine would not participate in Obamacare because it would degrade “our nation’s premier health care system.” On Monday, he acknowledged that he was talking with federal authorities about Maine’s position on the program.

It’s a long way to a bargain, but there appears to be a deal to be had here that allows both parties to achieve policy priorities through compromise. The Republicans can reduce debt, and the Democrats can extend access to health care.

With much tougher budget issues still ahead, we hope that the parties can resolve this one and move on. It’s nice to know that divided government doesn’t have to be dysfunctional.