AUGUSTA, Maine — In a suit filed Thursday, a statewide association that represents Maine cities and towns is asking a judge to rule on the legality of a new policy from the administration of Gov. Paul LePage that would cut funding to communities that provide welfare benefits to undocumented immigrants and asylum seekers.

Earlier this year, LePage’s Department of Health and Human Services issued a directive to municipalities, saying it would no longer reimburse them for General Assistance benefits they pay to some undocumented immigrants.

According to the new guidelines, noncitizens with expired documentation are ineligible for assistance, as are immigrants who have applied for asylum or refugee status but are awaiting a final decision on their applications. The latter group would be turned away, even if they had a receipt from the federal government indicating that they are in the country legally.

The lawsuit, filed in Cumberland County Superior Court by the Maine Municipal Association along with association members Portland and Westbrook, also notes that on June 20, LePage delivered correspondence to all municipalities saying that all state General Assistance funding — not just the portion provided to undocumented immigrants — would be denied to municipalities who do not follow his directive.

“[The Maine Municipal Association] believes the action is necessary to see whether the DHHS directive is legally binding, as it was issued without the standard and long-followed rulemaking procedures that govern virtually every other directive and regulation coming from the state,” according to a statement issued by the association on Thursday afternoon. “[The Maine Municipal Association] wishes to stress that the lack of process is the central legal issue here, along with the fact that conflicting opinions among DHHS, the governor’s office and attorney general have put municipal General Assistance officials in an untenable position.”

Attorney General Janet Mills, a Democrat, has warned that withholding payments to undocumented immigrants could be unconstitutional under Maine law, but LePage’s administration says they are simply forcing cities and towns to follow federal law.

Mills also has said the directive from LePage is an unfunded mandate on municipalities as it would require them to, in effect, become immigration officials who would have to verify an immigrant’s legal status.

Lewiston Mayor Robert Macdonald said he welcomed the Maine Municipal Association’s suit.

“At least this will clarify it,” Macdonald said. “This will tell us if we face a lawsuit and just where we stand. If we fight a lawsuit, even if we end up winning, we lose because it costs us so much.”

But Macdonald said he still supports LePage’s effort to curb General Assistance.

“I hope this turns out that the governor is right,” he said. “It’s just additional money we have to pay for people, and we should not have to because they are here illegally.”

Maine law requires cities and towns to pay General Assistance to needy residents out of their general fund and property taxes. Single recipients can be eligible for up to $537 per month in aid from municipalities to help pay for basic necessities: housing, utilities, medicine and food. Multi-person households can be eligible for more.

The state then reimburses Maine cities and towns for a portion of what they paid out. Generally, the state repays half of what the municipality paid. The state reimbursement rate increases to 90 percent for a city once it pays out a certain amount.

In Bangor and Portland — two cities that have pledged to ignore the new guidelines and comprise 60 percent of all General Assistance spending — the directive to curtail state reimbursement could mean millions of dollars in lost state reimbursement.