In the ongoing battle to keep migrants out of the town of Salina, a judge on Tuesday granted temporary restraining orders filed by the town and Onondaga County against the Candlewood Suites hotel to prevent it from sheltering them.

In court documents, the town sued the hotel, alleging it's violating town zoning codes by unlawfully converting the hotel into an illegal long-term residential facility. A judge agreed that the building is not properly coded for long-term stay and would need to have its code properly updated before it could take on the migrants.

The restraining order also disallows any building modifications.

An injuction granted to Onondaga County on Tuesday prevents any hotel in the county from sheltering migrants, according to court documents.

According to Town Supervisor Nick Paro, the hotel contracted with New York City to bus an unknown number of migrants this week despite an emergency order by the Onondaga County executive banning hotels from sheltering the individuals.

“It's not as simple as they just show up and they're immediately able to work and assimilate into society," Paro said. "There's a lot of heavy lifting that needs to be done. And if New York City and New York state itself is unable to solve this problem, how are we going to solve it here in Salina, here in Onondaga County?”

The suit seeks to stop Candlewood until it can obtain the permits that would allow it to make the changes.

Those permits may be hard to secure, however, with Paro writing in a letter last week that Salina wouldn't accept migrants, citing the cost and lack of space in the town.

"Our residents fear what will happen to their neighborhoods if one, or two, or 10 buses of illegal migrants roll into our town," Paro wrote in a statement. "Our business climate, strained as it already is by New York State malfeasance, cannot withstand this additional burden, especially in our hotels.”

The sides in the Salina case are due in court on May 31 and on May 26 in the county's suit.

Paro said the hotel also was served with code violations on Monday after inspectors said they were operating as a residential facility.

This all comes on the heels of the transport of migrants to the Hudson Valley over the past two weeks, which has led to lawsuits, counter-lawsuits and temporary restraining orders.