NEW YORK (AP) — A federal judge in New York has temporarily blocked President Donald Trump's plan to deny green cards to many immigrants who use Medicaid, food stamps and other government benefits.

U.S. District Judge George Daniels' ruling Friday prevents the policy from taking effect Oct. 15.

The Trump administration had proposed that immigrants be disqualified from getting legal U.S. residency if they were likely to become a burden on public welfare programs.

The injunction puts the policy on hold while a lawsuit over the police advances.

The lawsuit in New York is one of several legal challenges nationwide to one of Trump's most aggressive steps to cut legal immigration. Advocates say the rule changes are discriminatory because they would deny legal residency and visas to immigrants who don't have money.