A plan to build a homeless shelter along one of Manhattan’s swankiest neighborhoods near Central Park and the Plaza Hotel got a green light Thursday from a New York state appeals court, which dismissed a lawsuit by residents and business owners seeking to stop the project.

The West 58th Street Coalition sued in 2018 over a city proposal to develop a men’s shelter at the now-closed Park Savoy Hotel in an area of Midtown known as Billionaires’ Row. The facility posed a security concern and would become a “safety hazard” because it was structurally unsound, the group said. It claimed the city improperly classified the historic hotel, built in 1910, to allow use of residential spaces that don’t comply with current building standards.

A judge dismissed the lawsuit in April 2019, noting that the issuance of a temporary certificate of occupancy meant the city’s Department of Buildings determined the structure was in compliance with local laws. An appeals court in Manhattan reinstated the suit in August and ordered further hearings on whether the use of the building was “consistent with general safety and welfare standards.”

But the state’s highest court in Albany reversed that decision on Thursday. It said the classification of the building on West 58th Street was based on evidence that the residents would occupy units for an average of 30 days. The court said the Manhattan appeals court went beyond its authority.

“Upon concluding that an authorized agency has reviewed a matter applying the proper legal standard and that its determination has a rational basis, a court cannot second guess that determination by granting a hearing to find additional facts or consider evidence not before the agency when it made its determination,” the Albany court said.

The decision clears a path “for opening a resource-rich shelter that New Yorkers desperately need,” the city’s Law Department said in a statement.

Jeremy Honig, a lawyer for the West 58th Street Coalition, didn’t immediately respond to an email seeking comment on the decision.

This article was provided by Bloomberg News.