A federal judge has blocked the Trump administration from halting food aid used by more than 40 million low-income Americans amid the ongoing US government shutdown.

A Rhode Island judge said on Friday that the plan to suspend the Supplemental Nutrition Assistance Program, or Snap, is likely unlawful, and issued a temporary restraining order at the behest of the plaintiffs.

That order came moments after a federal judge in Massachusetts said the administration is required by law to pay at least partial benefits.

The US Department of Agriculture said this week that the food assistance funds will not be distributed in November due to the shutdown, arguing the "the well has run dry".

Republicans and Democrats have traded blame for the federal shutdown, which will soon enter its second month, and there has not been any meaningful progress toward a deal.