Orange County says a judge has handed out a preliminary injunction in the county's favor, stopping New York City from sending migrants.
A state Supreme Court judge has held NYC must not send any other homeless people to Orange until the city complies with state law.
There is an exception for the 186 people already at two hotels in the county.
The judge also decided that Orange County is entitled to do inspections at those hotels, and NYC must be responsible for all related expenses and provide ID info for all the people staying in the county.