The inner workings of Maine’s largest state agency have fundamentally changed during the past six years with Health and Human Services Commissioner Mary Mayhew at the helm.

As Mayhew, who announced her resignation Wednesday, served as the point person for many of Gov. Paul LePage’s top political priorities, the department she oversaw became more closed off to public scrutiny, and power over day-to-day affairs became increasingly centralized in Mayhew’s office, rather than in the Department of Health and Human Services’ six offices that administer state programs and services.

Reporting by the Bangor Daily News’ Maine Focus team over the past year has turned up the following about Mayhew’s DHHS, which employs the most people of any state agency and is responsible for more than a third of state spending:

Taking the lead on spending decisions. As the LePage administration shrank the state’s Temporary Assistance for Needy Families program — which provides a small amount of cash assistance and job support to low-income families with children — starting in 2012, the state began building up a balance of unspent TANF money that reached $155.5 million last summer. (The federal TANF block grant brings $78 million into Maine each year, regardless of whether the state spends the money.)

As Maine DHHS explored new ways to spend that money, staff in Mayhew’s office took the lead on spending decisions that DHHS officials from past administrations said previously belonged to staff in individual program offices.

Ultimately, Maine DHHS spent more than $13 million that originated from TANF in ways that ran afoul of federal law: The state spent the money on services for elderly and disabled residents when federal law required that it be spent on low-income families with children.

After the BDN reported on this spending in June 2016, the department reversed it, and State Auditor Pola Buckley followed up with a report in October 2016 that confirmed the misspending.

More than 300 pages of internal emails released to the BDN earlier this year show that state finance staff questioned the planned spending on multiple occasions before the department finalized the prohibited transactions in 2015. The emails showed that Sheryl Peavey, who then worked in Mayhew’s office as DHHS’ director of strategic reform, coordinated the prohibited spending; Mayhew later promoted her to chief operating officer of the Maine Center for Disease Control and Prevention.

The emails also showed that the primary objective driving internal discussions about spending TANF money was freeing up money from DHHS’ state taxpayer-funded budget by covering expenses with TANF money.

Controlling the release of public information. Documents recently obtained by the BDN also show that Mayhew’s office has taken control of the release of public information. Over the past year, requests for public information made under the Maine Freedom of Access Act have had to go through Mayhew’s office for approval.

Under changes to the protocol made last summer, staff in Mayhew’s office were to send out the initial notice required under state law to acknowledge the state has received a public records request. Staff in individual program offices were not to search for public records related to an information request without clearance from Mayhew’s office. And DHHS’ general counsel and media relations manager both had to sign off on the release of public information in response to many of the public records requests the department received.

When Judy Gopaul, a Maine CDC employee who handled public records requests specific to the CDC, didn’t secure the approval of both the department’s lawyer and its media relations manager before releasing a public report to the BDN last summer, she was fired.

Closely involved in program operations. Mayhew and her staff became closely involved in ground-level program operations in other ways.

For example, the former director of the state’s public health nursing program, Ted Hensley, told the BDN last summer that he was not allowed to email the employees he supervised without the approval of staff in Mayhew’s office.

The public health nursing program has contracted sharply during LePage and Mayhew’s tenure; today, the state employs about 20 public health nurses who respond to disease outbreaks and focus on the health of newborns and their mothers by visiting them in their homes. Although lawmakers have appropriated funds for more than twice as many positions, the LePage administration hasn’t filled vacancies.

Hensley served as the director from September 2012 until March 2016.

In another example, the employees who administer Maine’s WIC program — the Supplemental Nutrition Program for Women, Infants and Children — were proceeding with a federally required technology update until Mayhew and her staff put a halt to it in the summer of 2015.

Under federal law and with federal funding, Maine’s WIC staff were working to update the program from a system based on paper vouchers that recipients redeem for a narrow range of foods at the grocery store to an electronic system under which recipients would use an electronic benefit card.

In the summer of 2015, Mayhew informed WIC staff of her desire to include photo IDs on the electronic benefit cards. WIC staff had already designed the benefit cards without photo IDs, and they were prepared to start negotiations with technology vendors after soliciting bids.

Mayhew’s insistence on including photo IDs put the project on hold indefinitely as the federal government, which covers all WIC costs, informed Mayhew that it wouldn’t cover photo ID-related expenses. Maine WIC staff could accomplish little with the project on hold and with no technology vendor under contract, but the state still had to pay to keep contractors on board to eventually carry out the project.

Last October, with the technology update stalled, the state gave up $1.4 million in federal funds it had been awarded to make the update. The U.S. Food and Nutrition Service told the BDN in January that federal funding would be available when Maine was prepared to resume the technology update.