The Maine Department of Health and Human Services is asking a federal court to order Portland and Westbrook to comply with its new policy and stop giving General Assistance funds to undocumented immigrants.

In a counterclaim filed by the DHHS in U.S. District Court, the state contends it will suffer “significant” and “irreparable harm” if the cities continue to give vouchers for food and housing to people who are not in the country legally.

The state is responding to a suit against DHHS filed by the Maine Municipal Association that argues the administration cannot institute the new policy without going through the rule-making process.

“Since this is active litigation, we can’t comment on specifics,” Peter Steele, a spokesman for Gov. Paul LePage, said in an email. “However, this administration takes every lawsuit against the state very seriously and will work with legal counsel to present a robust and thorough defense.”

The counterclaim filed Monday does not contain new allegations or requests for relief, said Russell Pierce Jr., an attorney who represents the Maine Municipal Association, Westbrook and Portland. “There’s nothing really new here,” Pierce said.

The counterclaim is the latest development in an election-year battle over welfare and immigration. LePage has made welfare reform a central issue in his re-election campaign against Democratic U.S. Rep. Mike Michaud and independent Eliot Cutler.

As one of his first acts as governor, LePage authorized state officials in 2011 to ask people seeking state services about their immigration status. More recently, he objected to the federal government’s placement in Maine of eight unaccompanied children who crossed the border illegally from Central America.

In December, LePage’s administration proposed a rule change to allow the state to withhold payments to municipalities that provided aid to undocumented immigrants, including asylum seekers and immigrants with expired visas.

Maine Attorney General Janet Mills, a Democrat, argued that the rule change would violate the state Constitution. The administration pressed forward, telling cities and towns that it would withhold all General Assistance payments to those that continued to provide aid to undocumented immigrants.

With the DHHS and the attorney general split, the Maine Municipal Association filed a lawsuit in June to provide guidance to its members.

Originally filed in state court, the state sought to move the case to federal court because the administration’s case is built on a federal law that the administration says prohibits undocumented immigrants from receiving General Assistance unless the state enacts a law allowing it.

The Legislature has not enacted such a law, the administration notes.

Officials in Portland and Westbrook have said they will continue to provide assistance to undocumented immigrants.

Portland, Maine’s largest city, received $7.4 million from the state last year for all General Assistance recipients. The money helped support nearly 4,300 people, the majority of whom are legal U.S. citizens.

The state reimburses municipalities 50 percent to 90 percent of the total costs.

In its counterclaim, the state asks the court to declare that the administration has the right to deny General Assistance to “aliens who are not federally eligible aliens,” and all General Assistance payments to communities that refuse to comply with the order, or to require the communities to make “reasonable efforts to ascertain whether those aliens are federally eligible aliens” and “enjoin the cities from making general assistance to payments to aliens not determined to be federally eligible aliens.”