(The Center Square) — A federal judge has denied New York City's request to return $80 million in FEMA funds for migrant housing that the Trump administration clawed back.

In a ruling on Wednesday, U.S. District Judge Jennifer Rearden of Manhattan declined to issue a temporary restraining order blocking the Trump administration from pulling back the federal funding approved by the Biden administration last year to reimburse the city for hotels it leased as shelters.

Rearden said the city failed to prove it would "suffer irreparable harm" if the money isn't returned but is still allowing the lawsuit to challenge Trump's decision to go forward to a trial.

The legal challenge stems from a decision by Homeland Security Secretary Kristi Noem to rescind FEMA money that had been paid out to the city as a reimbursement for expenses incurred covering lodging costs for migrants. The funds included a $59 million FEMA grant, and another award for $21.5 million had been pulled back by the federal government after accessing the city's bank account.

Noem said she pulled the FEMA grants because the Venezuelan gang Tren de Aragua, which she alleged was using the Roosevelt Hotel as its "base of operations," was benefiting from the federal funding.

The Manhattan hotel at one point sheltered Jose Antonio Ibarra, the Venezuelan illegal immigrant who was convicted of killing 22-year-old Georgia nursing student Laken Riley last year.

New York City filed a lawsuit on Feb. 21 alleging that the "long arm of the federal government" illegally seized the FEMA funds approved by Congress to help reimburse the city for migrant costs.

"Defendants’ money-grab — after FEMA review, approval, and actual payment, without notice or process of any kind — was, simply put, lawless," lawyers for the city wrote in the complaint.

Lawyers for the city are asking a judge to return the money and prevent the federal government from taking additional funding from the bank account in connection to the shelter program in the future.

Mayor Eric Adams, who has been accused of siding with Trump's immigration crackdown in exchange for dropping federal charges against him, was among Democrats who criticized the administration's move to pull back the funding. He said the Big Apple shouldn't be saddled with the cost of caring for migrants alone.

New York City has spent an estimated $7 billion on housing and other costs for more than 230,000 migrants who have arrived since early 2022, with about 45,000 individuals currently under its care.