Residents of Jersey City, New Jersey, voted overwhelmingly in favor of strict short-term rental regulations on Tuesday, putting an end to the high-profile feud between Airbnb and local officials that had engulfed the city in recent months. The move comes as a major blow to Airbnb, which spent more than $4.2 million blanketing Jersey City in television ads, handouts, and pro-Airbnb canvassers in a campaign to quash the restrictions, which will affect a popular destination for guests looking to visit Manhattan (which is just across the Hudson River and several minutes away on public transit) without running afoul of New York's tight rules on short-term rentals.

The new rules crack down on Jersey City’s booming short-term rental industry—which has grown by an order of magnitude since city officials effectively legalized the practice in 2015—by requiring that owners obtain permits and limiting who can rent out their spaces and for how long. Despite an aggressive opposition campaign, voters approved the regulations in a landslide, with current estimates suggesting nearly 70% voted in favor of the measure.

Jersey City’s rejection of Airbnb suggests that the tide may be changing for the so-called tech unicorn, as the city joins the growing ranks of former Airbnb defenders turned defectors. Local government officials around the nation that had been early advocates of the company, from Arizona and Louisiana to Oregon, are now turning against it. And with Airbnb looking to do an IPO in 2020—a process that involves airing out its dirty laundry for investors—every bit of regulatory backlash counts.

Airbnb has spent much of the last decade fighting for legitimacy in cities around the nation, earning the startup an infamous reputation among many local officials as a deep-pocketed agitator prone to litigation and public influence operations. The company has sued cities such as Boston, Miami Beach, Santa Monica, and even its hometown of San Francisco over ordinances beefing up short-term rental regulations, and it has spent hundreds of thousands of dollars hiring signature gatherers to help overturn local restrictions on both coasts.

However, over the years, the home-sharing giant began leaning more toward the carrot than to the stick. It has found success in many localities by partnering with local officials and agencies where each party ostensibly benefits. Airbnb began striking deals with city and state officials to collect and remit some difficult-to-collect taxes from hosts in 2014, with new rules legalizing home-sharing in the area often announced by local officials either simultaneously or shortly after.

Jersey City was one of the first to announce such a deal. In 2015, Mayor Steve Fulop entered into an agreement with Airbnb that was estimated to potentially earn the city up to $1 million in occupancy tax revenue a year. In exchange, Airbnb worked to get Jersey City officials to implement rules legalizing short-term rentals. Airbnb touted its work with Jersey City as an exemplary partnership, highlighting it at length in PR materials concerning regulations in the following years. At the time of the agreement, Jersey City officials lauded Airbnb and explicitly encouraged the use of the platform generally in statements issued at the time.

City officials now say that the legalization of short-term rentals was a grave mistake. When the deal was struck in 2015, there were around 300 active Airbnb listings in Jersey City. Within one year, that number had grown to roughly 2,000, according to an Airbnb press release from December 2016. At present, there are upward of 3,000 Airbnb listings in Jersey City, the majority of which are whole-home rentals—where the owner isn’t present during the guests’ stay—and are operated by hosts that run multiple properties, according to data from Inside Airbnb, an independent site tracking the company. (Airbnb questioned the methods used to collect the data but did not provide WIRED with any evidence disputing the claims.)

Officials say that the boom converted precious housing stock into de facto hotels, resulting in higher rents, quality of life issues in neighborhoods plagued by transient occupants, and an exacerbated housing crisis. It’s a concern echoed by many cities, as local government officials around the nation grapple with how best to handle the increasing popularity of short-term rental platforms like Airbnb, HomeAway, and VRBO in high-tourism areas.

In June 2019, the Jersey City council introduced a new ordinance aimed at remedying these issues. Starting in January 2020, rentals of a whole home or apartment where the owner isn’t present are capped at 60 days a year; renters are largely barred from listing their homes on platforms like Airbnb and HomeAway; and short-term rentals are banned in many multifamily buildings, among many other provisions. The ordinance passed, but Airbnb poured money into the city to gather resident signatures in opposition. Within 20 days of the ordinance’s passage, the company gathered more than 20,000 signatures, forcing a referendum.

“This administration is fighting to fix the quality of life issues our residents have had to endure over the years as Airbnb abuses their initial agreement with the city,” Mayor Fulop said in a statement. “We’re fighting to maintain affordable housing for those who need it most. We’re fighting to rid residential buildings of party hotels.”

In the lead-up to the vote Tuesday, Airbnb created a political action committee called Keep Our Homes, through which it spent some $4.2 million trying to convince the city’s 265,000-some residents to oppose the measure. Though it failed in this instance, Airbnb has used these tactics successfully before in cities like San Diego—which had to withdraw short-term rental regulations in 2018, following a similarly high-profile signature gathering campaign led by Airbnb and other short-term rental platforms.

“Cities from Buffalo to San Francisco and Boston to Seattle have managed to pass comprehensive short-term rental regulations without punishing tenants or creating red tape and onerous registration systems,” said Airbnb spokesperson Christopher Nulty, without mentioning Airbnb’s initial opposition to San Francisco's and Boston’s regulations, which ended only after the company settled the lawsuits it filed against each city. “It’s unfortunate to see the hotel-backed special interests run a campaign that moves Jersey City in a different direction.”

This story originally appeared on wired.com.