A federal judge in Rhode Island said Thursday that the Trump administration must fully cover food stamp benefits for tens of millions of Americans in November.

“People have gone without for too long,” US District Judge John McConnell said during a hastily called hearing Thursday. “Not making payments to them for even another day is simply unacceptable.”

Nearly 42 million Americans receive food stamps. Payments are made on a staggered basis over the course of a month.

But the US Department of Agriculture took the unprecedented step of halting benefits for November, saying the program had run out of funding amid the government shutdown.

Despite the judge’s ruling, however, many beneficiaries may have to wait at least a few more days to see the assistance, depending on where they live. States send food stamp enrollees’ information to vendors every month so they can load funds onto recipients’ benefit cards, often days or weeks before the new month begins. Those steps need to take place before benefits can restart.

McConnell’s order comes days after the administration, in response to an earlier order from him, said it would provide only partial food stamp benefits for November by using $4.65 billion in a contingency fund maintained by the Supplemental Nutrition Assistance Program, or SNAP, the formal name for food stamps.

The judge said the administration had not worked fast enough to ensure money reached the program’s millions of recipients and that it had acted “arbitrarily and capriciously” when it decided earlier this week that it would not provide the full benefits this month.

Under McConnell’s new ruling, the government must tap into billions of additional dollars held by USDA in a separate pot of money so full SNAP benefits can be paid. The judge said those payments needed to be made to states, which administer the program, by Friday.

The administration quickly appealed McConnell’s new order, as well as his ruling from last week that required the administration to at least partially fund food stamp benefits for November, to the First Circuit Court of Appeals. The Boston-based appeals court is stacked with appointees of Democratic presidents.

Throughout the brief hearing, McConnell repeatedly chastised an attorney representing the Trump administration over the government’s failure to ensure SNAP benefits quickly reached the millions of Americans who rely on them, stressing the on-ground-impact nearly a week after recipients began missing payments for November.

“Without SNAP funding for the month of November, 16 million children are immediately at risk of going hungry,” the judge said. “This should never happen in America. In fact, it’s likely that SNAP recipients are hungry as we sit here.”

On Tuesday, a coalition of cities, non-profits, unions and small businesses that brought the legal challenge complained that the administration was not complying with McConnell’s order from last week. The plaintiffs claimed that since the government admitted in court filings that reduced benefits could take weeks or months to be administered, they were violating his directive that the government work “expeditiously” to ensure November payments are made.

The judge agreed.

“It is clear to the court that the administration did not comply,” he said. “The court was clear that the administration had to either make the full payment by this past Monday, or it must ‘expeditiously resolve the administrative and clerical burdens it described in its papers.’ … The record is clear that the administration did neither.”

The hearing was the latest high-stakes court showdown over food stamps, which the administration had attempted to defund amid the government shutdown, prompting both the lawsuit in Rhode Island and a separate one filed by Democratic governors and state attorneys general in Massachusetts.

In both cases, McConnell and US District Judge Indira Talwani, of the federal court in Boston, made clear last week that the USDA must tap into contingency funds to provide at least partial SNAP benefits this month, but they left it up to government to decide whether to use unused tariff funds meant for child nutrition programs to provide full SNAP benefits for November. Both judges were appointed by former President Barack Obama.

The administration said earlier this week that it opposed using the nearly $17 billion left in the child nutrition fund because it would endanger the nation’s free and reduced-price school meals program, which serves about 29 million children a day. (The agency has transferred $750 million in tariff revenue to the WIC food assistance program for pregnant women, new moms and young children.)

But McConnell ruled on Thursday that the administration’s choice not to make full payments by dipping into the other pot of money at the USDA did not reflect reasoned agency decision-making.

He pointed specifically to the USDA’s decision to pull money from that pot to the fund the WIC food assistance program, saying that move “undermines” their argument against using it for SNAP payments.

“A rationale premised on such legal errors must be set aside as arbitrary and capricious,” McConnell said.

The administration pushed back strongly on claims that it wasn’t complying with McConnell’s earlier order and that it had made a slap-dash decision to only partially fund food stamps this month. It insisted in court papers filed Wednesday that since it had released the money from its contingency fund to states and provided guidance on how state officials can calculate reduced payments, “there is nothing more USDA could do.”

“We resolved all of the burdens that the government is responsible for,” Tyler Becker, a Justice Department lawyer, said during Thursday’s hearing.

Attorneys for the plaintiffs in the Rhode Island case said the new ruling from McConnell was a “major victory” for the millions of Americans who receive the federal food benefits.

“This immoral and unlawful decision by the administration has shamefully delayed SNAP payments, taking food off the table of hungry families,” said Skye Perryman, the president and CEO of Democracy Forward. “We shouldn’t have to force the President to care for his citizens, but we will do whatever is necessary to protect people and communities.”

The swiftly changing legal landscape has left states scrambling to catch up and recipients wondering when they would receive any assistance.

The USDA provided states with guidance on Tuesday on how to issue benefits based on cutting households’ maximum allotments in half, which the agency initially said was all it could provide with the available contingency funds.

To provide partial benefits, which has never been done before, states have to reprogram their systems to recalculate recipients’ payments.

Illinois said that beneficiaries would start seeing payments on Friday, while North Carolina and Massachusetts said recipients could expect to get their assistance next week. But Pennsylvania wrote the agency a letter saying that it would take a few weeks to get aid to recipients because of the burdensome process the USDA chose. Other states CNN contacted could not give a timeline for when benefits would be distributed.

By midweek, however, the situation has changed twice in less than 24 hours. On Wednesday evening, the USDA announced it could actually pay 65% of maximum benefits from the contingency fund and issued new guidance to states, which would necessitate another round of recalculations. The next day, McConnell ordered full payments to be made for the month.

This story has been updated with additional developments.