A federal judge on Wednesday ordered U.S. Immigration and Customs Enforcement to allow Congress members to inspect migrant holding rooms in New York City and elsewhere across the country.

The order follows a lawsuit filed earlier this year against the Trump administration by Reps. Dan Goldman, Adriano Espaillat and several other Democratic lawmakers, who said they were barred from entering ICE holding rooms in July.

The judge, Jia M. Cobb, also blocked ICE from requiring Congress members to give a week's notice before their inspection visits, a requirement the agency imposed in recent months.

Spokespeople for ICE did not immediately respond to a request for comment.

New York Congress members — including Goldman, Espaillat, and also Nydia Velázquez and Jerry Nadler — have tried multiple times to inspect the ICE holding rooms on the 10th floor of 26 Federal Plaza in Lower Manhattan, as they have claimed they are legally entitled to do.

Federal law allows members of Congress to inspect facilities “used to detain or otherwise house aliens,” and to do so without prior notice. ICE officials, however, have claimed that the holding rooms at 26 Federal Plaza were not subject to oversight because they are an off-limits “processing center” for immigrants facing potential removal, rather than a detention center.

In issuing the stay, Cobb said the lawmakers were likely to prevail in their ongoing litigation challenging the administration's refusal to allow for the oversight visits.

The holding rooms at 26 Federal Plaza have come under scrutiny for what attorneys and detainees have described as “inhumane” conditions.

In August, a federal judge ordered ICE to improve conditions at the facilities, including limiting the number of people detained there and providing sleeping mats and toiletries. Detainees’ attorneys are now calling on the court to hold ICE in contempt for violating the judge’s orders.

In recent court filings in that case, attorneys and detainees allege that ICE officials at the hold rooms are denying required hygiene products, clean clothing, and attorney phone calls to detainees in the hold rooms.

The federal judge in the case, Lewis Kaplan, has ordered the deposition of William Joyce, ICE’s New York Deputy Field Office Director. The deposition will focus on whether ICE is abiding by the restrictions outlined in Kaplan’s prior orders.