LEWISTON, Me. — Maine just ended its fiscal year in the black, with a healthy surplus of $176 million, a far cry from a few short years ago when it was hemorrhaging red ink.

Other governors might spend weeks boasting about such an accomplishment. But Gov. Paul LePage, Maine’s two-term Republican governor — who is barred by term limits from seeking re-election — is an irascible, combative showman and tends to step on his own good news.

Within days, he called on the state’s Democratic attorney general to step down from office while she runs for governor. He was ordered by the courts to comply with an election funding law he didn’t like and had refused to carry out. And he sent a letter to the governor of Massachusetts complaining that the state was engaged in a “shakedown” of Maine drivers who did not pay tolls on time.

With all that, there was little time to hail the surplus — even as critics said he had balanced the budget by slashing services for Maine’s least fortunate.