A couple months ago, Maine lawmakers were planning to take money from the state’s rainy day fund to restore municipal revenue sharing. Gov. Paul LePage was having none of it and insisted he would prohibit the state treasurer from going to the bond market until more money — $60 million — filled the rainy day account. One problem, however, was that the state had already approved cash advances to fund many important projects across the state in lieu of issuing the bonds.

Caught in the middle between the Legislature and LePage, H. Sawin Millett Jr., commissioner of the Department of Administrative and Financial Services, hinted at a path forward when asked if there was another way to fund municipal revenue sharing.

“I have some ideas,” he said. “I think there are ways out of this dispute.”

A few days later, Millett came through with a proposal all sides could support. The Legislature restored municipal funding, and LePage maintained the rainy day account.

Few in state government have the know-how and clout to chart a practical path forward in times of difficult or divided government. Millett, 76, is one. His May 31 retirement, though he prefers to call it a “stepping back,” was announced Thursday. It will be a loss for the state.

Millett, who has spent 55 years working for the public, leads nine bureaus and about 1,300 employees. Among many other things, the department is responsible for the financial management of state government and overseeing Maine Revenue Services.

Millett is probably the most qualified person LePage could have picked for finance commissioner. Indeed, the Legislature approved his nomination unanimously in 2011, and no one voiced hesitation. He served under five governors — as education commissioner for independent Gov. Jim Longley and Democratic Gov. Joe Brennan; legislative director, finance commissioner and commissioner of the newly formed Department of Administrative and Financial Services for Republican Gov. John McKernan; and policy adviser and associate commissioner of the Department of Mental Health, Mental Retardation and Substance Abuse Services for independent Gov. Angus King.

In addition, he has been a teacher, coach, principal and professor (teaching school leadership, law, finance and collective bargaining at the University of Southern Maine). He was the first executive director of the Maine School Management Association. He has moderated 45 town meetings and served as a selectman in both Dixmont and Waterford. He won six terms to the Maine House; for the last three terms he served as lead House Republican on the budget-writing Appropriations Committee.

Millet has been at the center of some of the state’s most significant challenges, including the government shutdown in 1991, the state’s violation of the Augusta Mental Health Institute consent decree in 1994, and the recession beginning in 2008. The political, fiscal and emotional aftermath of those difficulties are still felt today.

Often, Millett’s job has been to re-establish credibility and trust, so government operations can continue.

We won’t pretend to agree with all the actions Millett took as a legislator — such as to oppose same-sex marriage legislation in 2009 or vote against legislation in 2008 that prohibited people from smoking in cars with children. But his knowledge of budgeting, ability to find savings, willingness to admit mistakes, managerial style and overall thoughtful approach to governing, often contrasting with his boss’, are deeply appreciated and will be missed.

As LePage seeks a replacement, he will do well to look for someone with a similar level of patience and fortitude.