WASHINGTON — New Jersey and 12 other states went to federal court Wednesday to overturn a new immigration rule that could hurt more than 700,000 Garden State residents.

The rule announced by President Donald Trump would deny permanent legal status, known as green cards, to immigrants who use government programs such as food stamps, housing subsidies or Medicaid, or who are considered likely to do so. Opponents said it was a way for Trump to curb legal immigration from poorer countries, who are more likely to be non-white.

“No family should ever have to choose between staying in America and having access to health care, food, and housing,” Gov. Phil Murphy said.

The Migration Policy Institute, a Washington-based research group, estimated that 709,000 residents in New Jersey would be affected by the new rule, which is slated to take effect Oct. 15. That includes not only non-citizens but American citizens who live with people who are not.

Only five states would have more people affected than New Jersey. Nationwide, the total could be 22.7 million, according to the institute.

“The administration’s efforts to make immigration available only to the well-off are as unlawful as they are inhumane,” state Attorney General Gurbir Grewal said. “The American dream has always been about opportunity for all, not just the wealthy, but now our federal government is trying to keep out immigrants seeking to build a new life here, as families have done since the founding of our nation."

The Trump administration’s proposal would redefine a provision of the Immigration and Nationality Act, which allows the government to keep out an immigrant considered likely to become a “public charge.”

The state said that term traditionally has referred to someone who primarily would dependent on the government for support, not an immigrant who earns a living but relies on existing programs to make ends meet.

Trump’s acting director of Immigration and Customs Enforcement, Ken Cuccinelli, made his own edits to the poem at the base of the Statue of Liberty, “The New Colossus,” by Emma Lazerus. That poem reads, “Give me your tired, your poor, your huddled masses yearning to breathe free."

Cuccinelli modified it this way in an interview on NPR: “Give me your tired and your poor who can stand on their own two feet, and who will not become a public charge.”

Later, he told CNN that the next line of the poem — “The wretched refuse of your teeming shore” —referred to European immigrants.

“Well, of course that poem was referring back to people coming from Europe, where they had class-based societies where people were considered wretched if they weren’t in the right class,” Cuccinelli said.

U.S. Sen. Cory Booker, seeking the Democratic nomination to take on Trump next year, promised to reverse the rule if elected president, calling it “another racist policy that targets the less fortunate.”

This administration’s cruel new policy called #PublicCharge is another racist policy that targets the less fortunate & is intended to prevent certain immigrants from becoming citizens & voters. It’s wrong & goes against our values. I will reverse it as president. https://t.co/Vs5CnowKv4 — Cory Booker (@CoryBooker) August 13, 2019

Jonathan D. Salant may be reached at jsalant@njadvancemedia.com. Follow him on Twitter @JDSalant or on Facebook. Find NJ.com Politics on Facebook.

Have a tip? Tell us. nj.com/tips.

Get the latest updates right in your inbox. Subscribe to NJ.com’s newsletters.