Amazon’s decision to build one of its two new headquarters in New York City was supposed to be a slam dunk.

For its political backers, who made the deal largely in secret and hoped for a celebratory reveal, it was a no-brainer. The deal promised 25,000 jobs — good ones — with an average salary of $150,000 a year, in Queens, one of the city’s outer boroughs.

It was a move that would help cement New York City as a tech hub on par with Silicon Valley. And it would be a joint victory for two outspoken politicians, New York State Governor Andrew Cuomo and Mayor Bill de Blasio, who usually don’t agree on much.

“I think they thought this was the greatest victory of their careers” said New York City councilmember Jimmy Van Bramer, who represents the district where Amazon HQ2 is slated to be built; he is one of the most vocal politicians against the deal.

But the public started clapping back before de Blasio and Cuomo could finish giving each other congratulatory high fives. Residents were outraged that one of the world’s richest corporations was receiving a combined total of $3 billion in tax subsidies from city and state funds. It didn’t matter that advocates of the deal could rationalize the economics with future gains from the jobs and community benefits Amazon would provide. People were upset, not just with the terms of the deal but with how it was made — behind closed doors, with limited public input, and no involvement of local city leaders. These kinds of deals happen in smaller cities that need to lure corporations in, but in New York City, the sentiment was, Amazon would have come anyway.

On the day of the announcement, the nation’s most popular new member of Congress, Rep. Alexandra Ocasio-Cortez, tweeted harsh words against the deal to her 2.5 million followers. And on the ground, the same grassroots organizations that helped propel Ocasio-Cortez to national leadership, including the New York Democratic Socialists of America, were now organizing local rallies and door-to-door campaigns against Amazon. People were as angry with the contents of the deal as they were with the way it was made — in private and without input from local politicians or citizens.

About a month later, at the first of three scheduled public hearing at New York City Council, protesters held a rally outside chambers and interrupted the hearings, chanting “G-T-F-O, Amazon has got to go!” City council members were also fiery in their remarks — ridiculing the city’s plans to help Amazon build a private helipad for its executives.

After more than three hours of tough questioning from the council and jeering from the crowd, the two Amazon executives who attended the hearing left the meeting looking visibly displeased. This Wednesday, a day before Amazon’s quarterly earnings report, there will be a second city council hearing that’s set to be just as confrontational as the last one.

So how did leaders at the HQ2 New York City negotiation table — the mayor, the governor, the economic development corporation, and Amazon let this happen? While Amazon may have anticipated the public backlash (especially among residents of the losing cities) in the grander scheme of their national search, shouldn’t de Blasio and Cuomo have known their constituents better?

“There’s a real disconnect between decision makers and the feeling on the ground,” said New York State Senator Michael Gianaris, who, along with Van Bramer and New York State Assemblyman Ron Kim, has been among the more vocal politicians against the deal. “It’s a problem across the country where the anger at wealth concentration is not appreciated by people who are making decisions.” said Gianaris.

Gianaris says he wants the deal to be “torn up” and start from scratch. He’s trying to block the build, potentially by getting it voted down on the Public Authorities Control Board, where he says the state could halt funding for the subsidies. This seems like a long shot, since Amazon has so far bypassed going through standard local oversight committees — but opponents like Gianaris say they will consider taking legal action if Amazon doesn’t go through state review processes.

What’s more important — at least from a PR perspective for Amazon and the politicians who supported the deal — is whether the public is on their side.

Amazon, for its part, has been on a charm offensive to win over residents of Queens. The company has hired lobbyists and a political consulting firm to drum up support. In recent months, it sent several mailers to locals to persuade them to get on board with the deal. The company announced Tuesday that it is launching a program to fund computer science courses at 130 New York City high schools, including more than 30 in Queens. The company also plans to announce two other initiatives at Wednesday’s hearing, according to the New York Times: a technical training certificate program at LaGuardia Community College and a 30-person customer service center that will hire New York public housing residents.

To some extent, Amazon may already have support, albeit with reservations. A recent poll showed that 60 percent of registered Queens voters were in favor of Amazon moving into their borough, although 78 percent thought that New York City should be more involved in the process.

Critics say that context matters, and that the more people know about the terms of the deal, the more they oppose it. But the point remains that many Queens residents are happy with the idea of Amazon moving in, on reasonable terms.

Meanwhile, the politicians in support of the deal continue to stand behind it, albeit more quietly than they have in the past. In his recent 60-minute-plus State of the City address, de Blasio mentioned Amazon only briefly.

“The major new announcements from Amazon and Google show that the world’s most innovative companies want to be here, and they want to hire New Yorkers,” de Blasio said.

Google says that unlike Amazon, it didn’t ask for tax breaks from the city for its recent expansion in NYC. The big questions going into Wednesday’s public hearing will likely be: What will those Amazon jobs end up being, how many locals will fill them, and whether that will be enough to appease angry community members.

The continued fight over Amazon HQ2 in Queens is a reminder that tech companies can no longer expect to be welcomed with open arms when they move into a major metropolis — especially one with a voice as loud as New York City’s.

Sign up for the newsletter Recode Daily Email (required) By signing up, you agree to our Privacy Notice and European users agree to the data transfer policy. Subscribe