The state of California and several advocacy groups filed separate lawsuits Friday against a rule that would deny lawful permanent status to immigrants who use public benefits or are deemed likely to use them in the future.

The state and advocacy groups join two other lawsuits filed earlier this week after the Trump administration announced the rule, which could reshape the legal immigrant population in the country by making it harder for impoverished immigrants to obtain green cards or other changes in legal status if they use, or may use in the future, government assistance programs such as food stamps, Medicaid or public housing assistance.

“This cruel policy would force working parents and families across the nation to forego basic necessities like food, housing, and healthcare out of fear. That is simply unacceptable,” California Attorney General Xavier Becerra said in a statement announcing the lawsuit.

The suit was filed in the U.S. District Court for the Northern District of California and its other plaintiffs also include Maine, Oregon, Pennsylvania, and Washington, D.C. They argue that the rule violates the equal protection guarantee of the Fifth Amendment, is arbitrary and capricious and contrary to law.

Earlier Friday, multiple advocacy groups also announced they were filing a lawsuit in Northern California challenging the rule.

Marielena Hincapié, executive director of the National Immigration Law Center, called the rule a “racially motivated wealth test” and said it sent the message that if immigrants are “not white and wealthy, you are no longer welcome in this country, the land of opportunity.”

The law center is joined by co-counsel California Primary Care Association, the Western Center on Law & Poverty and Asian Americans Advancing Justice – Los Angeles. They also argue the rule is arbitrary and capricious, violates the equal protection guarantee and is invalid because it was promulgated by Acting Director of U.S. Citizenship and Immigration Services Ken Cuccinelli, who they argue are was unlawfully appointed to his role.

USCIS did not immediately respond to request for comment on the lawsuits

The Trump administration has defended the rule, saying it is meant to better ensure immigrants seeking to remain in the U.S. are “self-sufficient.”

“Throughout our history, self-sufficiency has been a core tenet of the American dream,” Cuccinelli said Monday in announcing the rule. “Self-reliance, industriousness, and perseverance laid the foundation of our nation and have defined generations of hardworking immigrants seeking opportunity in the United States ever since.”

Earlier this week, Cuccinelli was asked about the plaque on the Statue of Liberty, which reads, “Give me your tired, your poor, your huddled masses yearning to breathe free, the wretched refuse of your teeming shore.”

Cuccinelli offered a new take, “Give me your tired and your poor who can stand on their own two feet and who will not become a public charge.”

The rule, which is due to take effect in mid-October, requires immigrants to prove they are unlikely to ever need such public assistance and can bar immigrants who had received assistance above a certain threshold from being approved.

While immigration law bars immigrants likely “to become a public charge” from changing or renewing their immigration status, the new rules defines public charge as any immigrant who personally benefits from one public benefit for 12 months during a 36-month period. Receipt of two public benefits in one month counts as two months, the rule notes.

The government has estimated the rule would affect about 382,000 people seeking to adjust their immigration status, but immigration advocates fear that millions of people could ultimately be impacted by the regulation.

Thirteen states filed a federal lawsuit Wednesday against the Department of Homeland Security also challenging the rule and San Francisco and Santa Clara countries in California filed a lawsuit challenging the rule on Tuesday.