In a case winding its way through courts, a synagogue is claiming a Constitutional right to run a hotel that would otherwise not conform to city codes.

Last Thursday, New York City's Department of Buildings served a partial vacate order at 1370 York Avenue, calling several of the building's rooms part of an "illegal transient hotel." For now the city seems to have succeeded in shutting down the guest rooms.

1370 York is at the center of an unusual legal dispute. An organization called the MacDougal Street Synagogue leases that building and two next door at 1372 and 1374 and runs them as lodgings, even though they are zoned as ordinary apartments. The city has also shut down the hotel rooms in 1372 and 1374.

"Those are not synagogues in my district, those are residential buildings and they're using them as hotels," said state Assembly Member Micah Z. Kellner, who represents the Upper East Side district that includes the properties. "Whether there's a religious aspect or not, illegal hotelling is not good for our city," he added.

In various complaints, the Department of Buildings' website ticks off problems with exits, fire alarms and sprinkler systems at the York Avenue locations.

One inspector's report also cites a partition erected to create additional bedrooms. Partitions have become a hot-button issue in New York in the wake of a devastating fire in the Bronx that killed three residents of an illegally subdivided apartment.

Last September, according to a recent court decision, a city inspector at the 1370 property "spoke to two women who alleged that they lived in an apartment at the premises under long-term leases and that the landlord had entered the apartment without their permission and subdivided it to create a third bedroom, which was being used by a succession of European tourists."

On its website, the synagogue describes itself as "a not-for-profit religious organization based in New York City that promotes a modern take on tolerance to New York City visitors from throughout the world." Those visitors have had the option to stay in rooms on York Avenue or in the East Village and the Financial District.

On lodging search websites like Hostels247.com, the synagogue describes the rooms as part of an effort "to build a new synagogue and in its never ending quest to teach tolerance." For now, it seems, the organization has no place to call its own -- besides its multiple hotel and hostel properties.

Time and again the city has hit MacDougal's locations with Department of Buildings inspections, and as with many such operations around the city, those complaints seem to have done little to affect daily business.

Last year MacDougal, along with the owner of 1370 York Avenue, fired back at the city with a motion claiming that because of the First Amendment and a quirk in city rules, it should be able to expose tourists to "the teachings of tolerance without being subject to the restrictive apartment conversion requirements set forth in the New York City Administrative Code."

MacDougal said non-profits are granted leeway under the city codes to run dormitories. A sign posted on the doors of one of its properties states that the synagogue believes "rooming units within an apartment are permitted to be used by religious institutions" and that "the exemption is complete and undefined."

A decision last month in the New York County Supreme Court denied the synagogue's motion for an injunction against the city.

Justice Barbara Jaffe wrote that MacDougal and the owner of 1370 York Avenue:

have failed to establish, prima-facie and as a matter of law, that the exception set forth in Administrative Code § 27-2077 applies to them absent evidence as to whether the premises are owned and operated without profit and whether their renters can be considered “students attending a school or college,” or that they are entitled to an injunction in light of their admission that various health and safety violations are present at the premises.

Jaffe mostly ignored the synagogue's First Amendment claims, which hinge on the tolerance programs the organization touts. Some former visitors say those programs consisted of nothing more than posters.

Haley Stocking of Seattle stayed at 1374 York Avenue and found the accommodations to be clean and reasonably priced.

PHOTO GALLERY

"We were thrown off by the name when we initially arrived, since there was nothing about a synagogue listed on the website where we'd made reservations," Stocking told HuffPost in an email. "We weren't given any pamphlets or educational handouts, but there was a good deal of material posted on the walls in the hallways (just 8.5x11-sized papers promoting tolerance)."

Another happy customer, S Jessica Deal of North Carolina, echoed Stocking's comments about her stay. "We never received any informational materials, besides our bill, of course. I did feel safer knowing we were staying in a synagogue, if that accounts for anything," she said.

Their experiences match dozens of reviews on HostelBookers.com that make scant mention of tolerance programs -- reviews that, since Monday, are available only as Google caches.

MacDougal's York Avenue locations have vanished from the "Stay With Us" section of its website, and a city inspection at 1370 York Avenue Tuesday found compliance with the partial vacate order.

The synagogue's president, Rabbi Shmaya Katz, also runs the Chabad of Wall Street. A sign on the door at 1370 York Avenue said the synagogue and a community center were "coming soon," and that in the meantime "Rabbi Shmaya Katz and the Board of Directors invite your inquiries regarding joining our synagogue, planning your bar mitzvah, weddings, and other blessed events."

Katz and the synagogue did not return requests for comment.

Tom Cayler, the volunteer committee chair on illegal hotels for the West Side Neighborhood Alliance, which tracks alleged illegal guest houses throughout the city, said that as far as he can tell, "the MacDougal Street Synagogue does not exist as a brick and mortar religious institution."

Cayler said illegal hotels are a problem throughout the city, and a new law passed last year by the state legislature stiffened rules against them. That law took effect on May 1, after some operators attempted to issue an injunction halting its enforcement.

Since the city's legal victory, various advocates and legislators said they have heard about increased enforcement action against such properties. The city did not return a request for comment.

A sign on the door at 1374 York Avenue chalked up the closure of its rooms to "emergency repairs and a new law that went into effect on May 1, 2011." Another sign, invoking arguments of many in the short-term rental industry, alleged that "the 'hotel lobby' is trying to eliminate competition."

Kellner said that if enforcement has been stepped up, he is pleased.

"I think it's terrific; I was a sponsor of the law," Kellner said. "Illegal hotelling has really become very prevalent in my district over the last five to ten years, and it really endangers both our housing stock and the residents who live in these buildings."