There are few fiercer enemies than Airbnb and the hotel industry. The two have been at each other’s throats practically since the short-term rental giant began back in 2008. Yet they now appear to agree on at least one thing: They could each stand to learn a thing or two from the other.

On Monday, Airbnb adopted a strategy from the hotel playbook, announcing a fleet of new apartment-style luxury hotel suites exclusively available for Airbnb guests in New York City. Simultaneously, hotel giant Marriott International is reportedly gearing up to launch its own home-rental business.

Marriott, which owns popular hotel brands like Sheraton, W Hotels, and Ritz-Carlton, has yet to announce plans for a US-based short-term rental program. But it’s in the works, according to a Wall Street Journal report. The world’s biggest hotel operator has been testing the idea via a pilot program in Europe and reportedly plans a global expansion. A public announcement detailing the first stage of Marriott’s plans to enter the short-term rental space could come “as early as next month,” according to the report.

Marriott has its work cut out in competing with Airbnb, which controls 51 percent of the short-term rental market in the US, according to an analysis by Host Compliance, a company that tracks online rentals and works with city officials to enforce local laws. The second- and third-most popular services, VRBO and HomeAway—both owned by Expedia Group—are said to control 17 and 11 percent of listings, respectively.

Booking.com, the hotel and travel aggregator that owns Priceline and Kayak, claims to offer over 5 million short-term rental listings, and, much like Marriott, is often referred to as a viable Airbnb competitor. But it controls only 5 percent of the market, according to Host Compliance.

But Airbnb faces aggressive pushback by local government officials in several cities, who allege that Airbnb rentals often operate as de facto hotels—without adhering to the same laws and restrictions.

New York City in particular—the site of Airbnb’s latest announcement—has been particularly hostile to the company. New York boasts some of the strictest short-term rental restrictions in the nation, and local officials have been embroiled in a messy public battle with Airbnb for much of the past five years. Most recently, a federal judge blocked a New York law that would have required Airbnb to send the city monthly reports including users’ names, information about the length of guests’ stays, and the addresses of properties listed on the site.

The city prohibits renting an entire apartment or home for less than 30 days without the owner present; only two guests are permitted, and they must have “free and unobstructed access to every room and to each exit within the apartment.” Plus, it’s illegal to advertise certain types of short-term rentals on online platforms like Airbnb; fines for violations can be up to $7,500.

On Monday, Airbnb announced a partnership with RXR Realty, the owner of a high-rise office building in New York’s Rockefeller Center, to turn 10 stories of the building into luxury apartment-style hotel suites listed exclusively on Airbnb. It’s not the company’s first foray into the hotel market. Last month, Airbnb said it had agreed to acquire last-minute hotel booking app HotelTonight, reportedly for upwards of $400 million.

Asked on CNBC Monday if the partnership might exacerbate tensions with local government officials, Airbnb CEO and cofounder Brian Chesky deferred to RXR Realty CEO Scott Rechler.

“Well this is fully compliant,” Rechler said. Because the building is a commercial space, local laws regarding the short-term rental of residential properties don't apply, Airbnb confirmed.

“We're working on a number of projects here in New York,” said Rechler. “And I think it can serve as a prototype … It can work in Miami, it can work in Vancouver, it can work in Montreal.”

More Great WIRED Stories