A divided Supreme Court ruled Monday to allow the Trump administration to implement a new rule giving the government broad discretion to deny legal immigrants visas on the basis of their income or use of public benefits.

The court said that the Trump administration's "public charge" rule could be implemented while it is challenged in court, nullifying an order from a federal judge that blocked the rule nationwide. The 5-4 vote was split along ideological lines with the five conservative judges ruling in the majority.

The controversial rule, which was announced in August , alters existing immigration law and expands what factors are used to determine if an immigrant is or will be a "public charge," or someone who relies on the government for assistance. Under the rule, legal immigrants who have used Medicaid, food stamps or housing assistance will have that weighed heavily against them when applying for a green card.

The rule also makes it easier for the government to deny green cards to immigrants it determines are "likely" to use public benefits in the future, giving the Trump administration broad authority to deny immigrants visas on the basis of wealth, education, English-language skill and other factors.

The policy drew sharp criticism when it was released and was immediately challenged in court. Several district court judges around the country blocked the rule from going into effect, but two federal appeals courts ruled in favor of the Trump administration.

One injunction, issued by a district judge in New York, was temporarily upheld by the 2nd U.S. Circuit Court of Appeals, prompting Solicitor General Noel Franciso to appeal to the Supreme Court.

Immigration Cartoons View All 171 Images

Franciso argued in court papers that the rule was a lawful use of executive authority and he also assailed the practice of lower district courts issuing nationwide injunctions.

Monday's Supreme Court ruling overturns the New York court's injunction and means that the Trump administration can implement the rule everywhere except Illinois, where it is blocked by a separate injunction.

The ruling only addresses the injunction and does not touch on the merits of the policy itself, though the rule could potentially end up in front of the Supreme Court again after the 2nd Circuit issues its final ruling on the merits of the policy. Monday's order suggests that the Trump administration may face favorable odds in front of the high court should that be the case.

The Trump administration has enacted a slew of policies aimed at restricting both illegal and legal immigration and has slammed what it describes as "activist courts" that have issued temporary injunctions against many of those policies.

The government said in the text of the new policy that it anticipates the policy will result in an increase in the number of denials for green cards and other immigration status changes.

The administration has touted the rule as a way to enforce ideals of self-sufficiency, but critics fear it will be used to deny visas to poorer immigrants – particularly those from Latin America and Africa.