PHOENIX (AP) — A judge has ruled the city of Phoenix erroneously excluded immigrants from receiving coronavirus aid to cover utility bills, mortgage and rental costs.

The city required applicants to its $25 million utility, rent and mortgage assistance program to provide proof of legal status in the United States.

The coronavirus’ current surge saw Arizona on Thursday report nearly 5,000 additional known COVID-19 cases, the eighth day in the last 10 that the state has report over 4,000 additional cases. Arizona reported a record 12,314 cases on Tuesday.

U.S. District Judge Dominic Lanza concluded Wednesday that Phoenix isn’t required to exclude unqualified immigrants from participating because the assistance program falls within exceptions in federal law for “short-term, non-cash, in-kind emergency disaster relief.” The judge said the city’s decision to exclude immigrants was trumped by federal law.

The immigrant advocacy groups that filed the lawsuit argued the federal law cited by the city in excluding immigrants had exceptions. The City argued the funds in question were a federal public benefit and were not subject to the exceptions.

The benefits are “non-cash” because the money isn’t given directly to applicants but instead is sent to landlords, mortgage companies and utility providers, Lanza wrote.

The judge said the city has said its decision to exclude immigrants wasn’t a policy decision but rather based solely on its interpretation of federal law. Lanza said Phoenix has indicated it will begin allowing immigrants to participate in the program in the future.

In other developments:

— The state on Thursday reported 4,928 additional known COVID-19 cases and 73 more deaths, increasing the state’s totals to 387,529 cases and 7,154 deaths.

Arizona had 3,408 patients hospitalized for COVID-19 as of Wednesday, up 121 from Tuesday and including 799 in intensive care unit beds, according to the state’s coronavirus dashboard.

The dashboard reported that 10% of both all hospital beds and of ICU beds were available.

Rolling seven-day averages for daily new cases, daily deaths and COVID-19 daily testing positivity all increased in the past two weeks, according to Johns Hopkins University and The COVID-19 Tracking Project data.

The rolling average of daily new cases rose from 3,964 on Nov. 25 to 5,946 on Wednesday while the rolling average of daily new deaths rose from 22.7 to 48.9 and the daily positivity average rose from 20.1% to 31.7%.

— Tucson Unified School District in January will start the school year’s second semester while still in remote-learning mode.

Superintendent Gabriel Trujillo told the district board Tuesday night that he didn’t know when TUSD will open for in-person learning because of the continuing increase in COVID-19 cases.

Reopening schools “is inextricably linked to the behavior of this community,” Trujillo said.

The district with approximately 42,000 is metro Tucson’s largest by enrollment.