We probably didn’t see the end of partisan gamesmanship at the State House last week, but what we saw was encouraging.

Under tremendous pressure, a bipartisan group of lawmakers got together and passed a budget and a major energy policy reform bill in the session’s final hours. Both measures passed over the veto of Gov. LePage, who fought to stop them until the last moments.

The less said about the governor’s behavior over the session’s last week, the better. He wanted Republican lawmakers to push the state government into a shutdown so he could extract a better deal from Democrats.

Fortunately, enough Republicans respected the state’s reputation enough to pass a budget that they didn’t like and prevent something that would have been much worse.

The energy bill did not come out unscathed, with a last-minute amendment demanded by the governor’s office. The bill that passed, however, will promote efficiency and lower energy prices.

Our state government can still function. Augusta is not Washington, D.C., and Mainers of all political stripes can be thankful for that.