The Supreme Court cleared the way for the Trump administration to implement new rules that would make it easier to deny legal permanent residency to immigrants deemed likely to use public benefits.

The court on Monday voted 5-4 to remove a nationwide injunction imposed by a judge in New York. The vote was split along ideological lines, with the five conservative justices in the majority.

The policy, unveiled in August, considers immigrants in the country legally who receive food stamps, housing vouchers, and Medicaid to be ineligible for green cards and a path to citizenship.

Critics of the policy have referred to it as a “wealth test” that would punish nonwhite immigrants who come to the United States legally. It could also burden local and state governments, hospitals, and food banks with millions of dollars in emergency healthcare and other costs, critics argued.

Federal officials said the policy ensured taxpayers wouldn’t be responsible for immigrants’ food, housing, and other costs.

The change does not apply to refugees or asylum seekers.