A Staten Island judge ruled Tuesday that a former school being used in the New York City borough to shelter hundreds of migrants must be vacated.

The ruling from Staten Island Supreme Court Justice Wayne Ozzi comes after hundreds of locals took to the streets a month ago to protest the city's decision to house migrants at the site of the St. John Villa Academy, citing safety concerns in the area as the building is positioned near other schools.

"It is refreshing to know that there are jurists in our system, like Judge Ozzi, who understand our concerns with having migrant shelters placed within residential areas," Staten Island Borough President Vito Fossella, one of the Republican lawmakers who filed the lawsuit against New York City, said in a statement.

"This decision is a victory for the residents of Arrochar and, frankly, all Staten Islanders," he added. "We believed the City acted improperly in placing a migrant shelter within the heart of Arrochar, a low-density residential community and across the street from a Pre-K-12 school." 

GOV KATHY HOCHUL CALLS IN NATIONAL GUARD AMID NEW YORK’S WORSENING MIGRANT CRISIS 

Staten Island migrant protest

Staten Island residents of the Arrochar neighborhood, joined by political activists, hold a rally to protest New York City plans to house migrants at the site of St. John Villa Academy on Sept. 5, 2023. (Andrew Lichtenstein/Corbis via Getty Images)

In a copy of Ozzi’s ruling obtained by Fox5 NY, it says that "if there were a right to shelter embedded in the State Constitution, all county and local municipalities upstate would be compelled to provide shelter to any and all migrant asylum seekers within their borders. 

"Obviously they have not," it continues. "A right to shelter, if it exists, would apply statewide, not just in New York City."

The station reports that leading up to Tuesday’s ruling, the Republican lawmakers in Staten Island — which include Rep. Nicole Malliotakis, R-N.Y. — sued New York City to block the school from being used as a shelter, to which the judge responded by temporarily placing a restraining order that prevented the city from doing so.

However, the city won an appeal against that decision. It’s not clear if it will appeal the latest one. Fox News Digital has reached out to the office of New York City Mayor Eric Adams for comment.

NEW YORK DEMOCRAT PRIVATELY BLASTS ‘IGNORANCE’ OF REPUBLICANS CONCERNED ABOUT MIGRANT BUSES IN LEAKED VIDEO 

Staten Island Borough President Vito Fossella and other officials celebrate court order

A judge issued a vacate order to halt the use of the former St. John Villa Academy as a migrant shelter — less than 24 hours after Staten Island Borough President Vito Fossella and fellow elected officials filed a lawsuit on Aug. 25. (Staten Island Borough President)

Tuesday’s ruling states that the shelter had the capacity to house "up to 300 migrant asylum seekers," according to Fox5 NY. 

Adams' office released a statement with regard to the community's backlash a month ago, saying, "We located the vacant St. John Villa Academy to serve as one of our respite sites for single women and adult families. We understand community concerns and want to assure them that we are working to ensure the site is well-managed." 

The city purchased the academy after it closed in 2018, and despite promises to make the location a school once again, officials went ahead with plans to move 300 migrants into the site, WABC reported.

New York City Mayor Eric Adams

It's unclear if New York City and Mayor Eric Adams will appeal the ruling. (Luiz C. Ribeiro/New York Daily News/Tribune News Service via Getty Images/File)

CLICK HERE TO GET THE FOX NEWS APP 

Malliotakis said in a message to Adams on X, formerly known as Twitter, "ACCEPT that this shelter violated the law and give Staten Island students the 1,000 seat school they were promised and deserve."

Fox News’ Bailee Hill contributed to this report.