The Maine Municipal Association wants a court to rule on the legality of a LePage administration directive to deny General Assistance payments to undocumented immigrants.

In a lawsuit, the association will ask a Superior Court judge whether the Maine Department of Health and Human Services overstepped its regulatory bounds by deciding to withhold state funding to communities that provide emergency aid to undocumented immigrants such as those who are awaiting word on asylum applications or holding expired visas. Portland, South Portland and Bangor officials have said they will continue to provide aid because they might be sued if they comply with the DHHS order.

The prospect of a court battle also raises the question of who will defend the state’s position given Maine Attorney General Janet Mills’ legal opposition to the policy change.

The Maine Municipal Association, which advises communities on legal and policy issues, said the decision to seek a court opinion was prompted not by any political disagreement with the governor, but by the conflicting information and advice about the issue. While DHHS officials and Republican Gov. Paul LePage insist a 1996 federal law prohibits spending taxpayer dollars on aid for undocumented immigrants, Mills has questioned the constitutionality of the DHHS policy shift and said any eligibility changes must go through the rulemaking process.

LePage increased the pressure last week by vowing to withhold all General Assistance money – temporary emergency assistance to cover basics such as housing, food and heat – to communities that ignore his administration’s stance.

“These conflicting directives put towns in a position where no matter how they act, there is a financial and legal liability,” said Geoff Herman, director of state and federal relations at the municipal association. “They are in a trap.”

In May, Portland provided an estimated $250,000 in General Assistance to more than 600 individuals who would likely be denied assistance under the new DHHS policy. Portland received more than $7 million in total General Assistance funding from the state for all recipients last year.

Mayor Michael Brennan said the association’s decision could help take some of the legal burden off of Portland, which was exploring its legal options to block implementation of the policy change. Brennan said he expects the city would join the association’s lawsuit, if asked.

“I think what MMA is doing is perfectly appropriate and exactly the right role” for an association that represents towns and cities, Brennan said.

But the Maine Heritage Policy Center, a conservative think tank that has supported LePage’s welfare reform push, criticized the lawsuit.

“The Maine Municipal Association is suing the LePage administration for bringing Maine into compliance with federal law,” the center said in a written statement. “The LePage administration’s policy will not only save taxpayers millions of dollars every year, but will also signal that Maine will not tolerate waste, fraud or abuse at any level.”

John Martins, spokesman for DHHS, insisted that the department is following federal law, not changing policy.

“As we have said from the beginning, federal law doesn’t allow state reimbursement for illegal immigrants and we are simply enforcing federal law,” Martins said. “We believe this is a common-sense measure to ensure that state funds are going to help U.S. citizens or those people who are in Maine with documented status.”

The municipal association is turning to the courts in hopes that a judge will review whether the DHHS directives on General Assistance are “legally enforceable” or whether the LePage administration should have gone through the rulemaking process, CEO Christopher Lockwood wrote Monday in a memo to municipal officials. In a second strategy, the association is also hiring an outside law firm to research the bigger policy issue of offering financial assistance to undocumented immigrants.

It’s unclear how the conflict between the governor and the attorney general will play out in the courtroom. Although the state’s top attorney, Mills could decline to represent DHHS in court. She could even file suit against a state agency if her office determines a policy runs counter to “public interest.” Mills’ office did not immediately respond to calls seeking comment Monday.

Last week, however, Mills repeated her office’s position that DHHS lacks the authority to change General Assistance eligibility on its own.

“Since there is no authority for this change, there is also no authority for the administration to withhold funds,” Mills wrote. “If the administration desires to change policy based on an 18-year-old federal statute, it must do so in accordance with the Maine Constitution and law, with transparency and public input, and without shifting the burden onto cash-strapped towns.”

Such a conflict between the attorney general and a state agency is not unprecedented.

Former Democratic Attorney General James Tierney sued the Maine Superintendent of Insurance in 1991 after determining that a proposed rate increase was unjustifiably large. The Maine Supreme Judicial Court subsequently upheld Tierney’s right to decline to defend the state in the case, based in part on the assertion that policy was contrary to the public interest.

Tierney now teaches about a state attorney general’s “duty to defend” the state as part of the Columbia University Law School’s National State Attorneys General Program. Tierney said that while most attorneys general encounter such cases, the number of high-profile conflicts is rising as states grapple with such constitutional issues as same-sex marriage, voter ID laws, immigration and abortion.

That’s because attorneys general must balance two obligations: to counsel state agencies on legal issues – and sometimes represent them in court – but also to defend the law and the Constitution.

“If the Office of Attorney General means anything, it means you have to stand up for the law … no matter how uncomfortable that may be,” Tierney said.