AUGUSTA — Newly released federal correspondence shows Maine did not formally ask about the legality of transferring $13.4 million in federal funds for needy kids until after it had changed course on its plan to spend the money on the elderly instead.

Maine’s Democratic state auditor, Pola Buckley, chastised the state Department of Health and Human Services for improperly transferring millions of dollars aimed at low-income children to fund a program serving the elderly and disabled.

Republican Gov. Paul LePage’s administration said Maine replaced the $13.4 million with state General Fund dollars in July and blamed federal officials for failing to provide “formal, written” guidance.

But correspondence obtained by The Associated Press shows it wasn’t until later – in August – that the department asked for “formal, definitive guidance” on “ambiguous” rules. The department started transferring the money in fall 2015.

Experts say the decades-old federal law is crystal clear even though Samuel Adolphsen, chief operating officer of Maine’s Department of Health and Human Services, wrote on Aug. 15 that the state had received “conflicting” guidance on the issue. He said a 2015 state-commissioned report suggests there’s flexibility when it comes to spending transferred welfare funds.

In an Oct. 13 letter to Adolphsen, a U.S. Department of Health and Human Services official pointed to the 1996 landmark law laying out the Temporary Assistance for Needy Families program. States can transfer a percentage of their annual welfare grant to a social services grant, but the transferred money can only go toward children and their families with incomes below 200 percent of the federal poverty threshold.

Rhode Island, Texas and other states explicitly cite that rule in their grant spending plans, and so did Maine’s 2015 report, Buckley noted. That report also found a “lack of transparency” when it comes to the department’s decision-making surrounding transferring welfare funds.

Maine Health and Human Services spokeswoman Samantha Edwards said there were “separate previous attempts the department made to establish a definite answer on this topic.”

A federal spokesman said the department and Maine officials first talked about rules for transferring funds in fall 2015, and in April, the department asked Maine why it used those welfare dollars on the elderly.

Maine’s Department of Health and Human Services in May told the federal government it would return the money.

In the last five years, Maine has amassed $155 million in unspent federal welfare funds, according to Maine’s Office of Fiscal and Program Review.

The LePage administration successfully pushed for a five-year cap on welfare benefits and has openly touted its plans to direct millions in welfare “savings” to the elderly. In an August 2015 news release, state Health and Human Services Commissioner Mary Mayhew said the “federal government has put up consistent roadblocks” to LePage’s push to prioritize the elderly and disabled over “able-bodied young adults.”

In her report, Buckley said the state Department of Administrative and Financial Services encouraged Maine Health and Human Services to seek written federal approval before transferring the funds.

Buckley said spending federal funds in prohibited ways and only returning the money if questioned “does not represent a valid system of internal control” over federal awards. “The fact that DHHS considers this acceptable is troublesome,” she wrote.