A large company based elsewhere in the country shows some interest in bringing jobs to New York City, maybe construct a large, marquee foothold in the city.

The company is rebuffed by labor advocates for its anti-union stance. Elected officials point to the company driving small businesses out of main street. We’re not against good jobs, but we are against companies that fail to share New York values.

That was the reception Walmart got in the previous decade as it sought to build a site in New York City.

The parallels between Walmart and Amazon aren’t perfect, of course.

Walmart employs many low-wage workers; Amazon was seeking to bring up to 40,000 jobs, many earning well into the six figures, in exchange for $3 billion in tax incentives.

But the company’s plan, backed by Gov. Andrew Cuomo and New York City Mayor Bill de Blasio, ran aground much in the same way Walmart’s ill-fated efforts 10 years ago: A confluence of populist politics, a backlash to large-scale economic development tax incentives and a rapidly changing city ultimately sank the agreement.

Indeed, the reasons for opposing Amazon seemed checked virtually every box in the progressive movement.

Opponents were spurred by the $3 billion in tax breaks benefiting the world’s richest man, the company’s stated opposition to unionization, Amazon’s contracts with the Immigration and Customs Enforcement Agency, the working conditions at the company’s warehouses and the impact the company would have had on the value of real estate in rapidly developing Long Island City.

The expense of living in New York, the uncertainty of your job, the fear of living as an undocumented immigrant, the power of a billionaire getting your tax dollars were all rolled into one very tangible news story in the age of President Donald Trump.

The deal would have been coupled with support for affordable housing as well as employment opportunities — highlighting a disconnect between the progressive movement, black and Latino voters and a split between labor unions.

The company’s plans for Queens were unfurling months after Rep. Joe Crowley was defeated by Alexandria Ocasio-Cortez in an upset Democratic primary and amid whispers of more primary challenges to the Democratic establishment’s left flank.

All this opposition came despite public polling, including a Siena College survey, that should broad statewide support for the deal — suggesting the criticism was mostly being stoked by an echo chamber on Twitter.

At the same time, the wide-open field for New York City public advocate gave more than a dozen elected officials and candidates an opportunity to sound off against the deal — with the megaphone of a campaign in front of them.

“Their corporate culture is so anti-union, that they decided to leave the city of New York rather than remain neutral,” said Councilman Jimmy Van Bramer, one of the chief opponents of the proposal, at a rally on Thursday.

The Retail, Wholesale and Department Store Union in a statement blasted the company on the way out as well.

“Rather than addressing the legitimate concerns that have been raised by many New Yorkers Amazon says you do it our way or not at all, we will not even consider the concerns of New Yorkers – that’s not what a responsible business would do,” said Chelsea Connor, a spokeswoman for the union.

But labor was not wholly opposed by organized labor. 32BJ in a statement called the decision by the company to pull out a blow to unions.

“For labor however, this is also a missed opportunity to engage one of the largest companies in the world and to create a pathway to union representation for one of the largest groups of predominantly non-union workers in our country,” said Hector Figueroa, the union’s president.

In Albany, there was surprise that the company had not done more to actively engage lawmakers and critics of the deal. That left the plan’s defense to the governor.

Cuomo last week said the state Senate, which had nominated Amazon deal critic Sen. Michael Gianaris to a board with veto power over the deal, would be to blame for the deal falling through. A Siena College poll this week found a broad swath of voters in New York City, union households and the suburbs backed the proposal.

The third term for the governor is about making the center hold as his party shifts further and further away from his political comfort zone. Third terms can be real pains, scuttled by boondoggles like a bad response to a snowstorm or the failure to get a football stadium built on the west side of Manhattan.

This chapter is wholly different, one in which the politics of the moment overcame anything else.