More than a dozen states, including Pennsylvania and New Jersey, have sued to stop the Trump administration from enforcing a new rule that could restrict the number of legal immigrants who live in or enter the United States by penalizing those who get help from public assistance programs.

The broader regulation expands the list of programs, such as Medicaid and food stamps, through which recipients could be declared a “public charge.”

The National Immigration Law Center and several other advocacy groups also have lodged lawsuits.

Pennsylvania Attorney General Josh Shapiro called the rule “a blatant attack on low-income immigrants who are here legally, contributing to our society, and standing on their own two feet — the exact people who are welcomed to our nation by the Emma Lazarus poem emblazoned on the Statue of Liberty.”

The Democrat joined a coalition of attorneys general who are challenging the rule in U.S. District Court for the Northern District of California. They allege that it targets working, legal immigrants and their families by creating unnecessary new barriers to lawful admission to the U.S.

The Trump administration says the new rule, to take effect in October, promotes self-sufficiency and perseverance among migrants.

U.S. Citizenship and Immigration Services acting Director Ken Cuccinelli said that “self-sufficiency has been a core tenet of the American dream” and “self-reliance, industriousness, and perseverance laid the foundation of our nation and have defined generations of hardworking immigrants seeking opportunity in the United States.”

For more than a century, dating back to the rule’s outlines in the 1882 Immigration Act, immigrants seeking to enter or live in this country have had to prove they will not become what is called a “public charge.” In the 1990s, the Clinton administration issued guidelines that took only cash benefits into account when determining whether an immigrant constituted a public charge.

The Trump administration has sought to dramatically expand the conditions of that test, saying the move would save American taxpayers millions of dollars a year.

The new rule defines “public charge” as anyone who receives one or more public benefits for more than 12 months, in the aggregate, within any 36-month period.

People applying for visas to enter the country or for green cards that permit legal permanent residency could be denied if they are deemed likely to rely on government assistance. Accepting those kinds of benefits now or in the past would be a heavily weighted negative factor in determining whether they represent a public charge.

On Tuesday, four more governments — New York state, New York City, Connecticut, and Vermont — filed suit in federal court in Manhattan.

New York Attorney General Letitia James, a Democrat, said the new rule flies in the face of enduring American values and a century of case law.

“Generations of citizens landed on the welcoming shores of Ellis Island with nothing more than a dream in their pockets,” she said in a statement announcing the lawsuit. “The Trump administration’s thinly veiled efforts to only allow those who meet their narrow ethnic, racial and economic criteria to enter our nation is a clear violation of our laws and our values.”

The rule affects those who seek admission to the U.S., an extension or change of visa status, or lawful permanent residency. And it applies to the use of federal programs including Medicaid, which is called Medical Assistance in Pennsylvania; the Supplemental Nutrition Assistance Program, known as SNAP; the Section 8 Housing Choice Voucher Program; the Section 8 Project-Based Rental Assistance, and the use of Section 9 Public Housing.

U.S. Citizenship and Immigration Services notes that acceptance of Temporary Assistance for Needy Families cash assistance, and state and local cash assistance programs, can lead to a person being designated as a public charge.

In Pennsylvania, about 175,600 immigrants receive Medical Assistance and nearly 80,000 receive SNAP, according to the attorney general.

”If allowed to take effect,” Shapiro said, “the rule could cause tens of thousands of Pennsylvania families to forgo health insurance and basic nutrition. It will also make it harder for hard-working, low- and moderate-income immigrants to be admitted into the United States or get green cards.”

This article contains information from the Associated Press.