“Dear Amazon,” the Valentine’s Day meme read. It was the day Amazon announced it would not, after all, be setting up a second headquarters in Long Island City. “It’s not us. It’s you.”

The meme, created by CAAAV Organizing Asian Communities, one of many groups fighting the Amazon deal, was cute and funny, but only partly true.

After all, it was “us” — the combined forces of the New York left, from new kids on the block like Queens Democratic Socialists of America (DSA), to community groups like CAAAV and DRUM (Desis Rising Up and Moving), who have been in Queens for years, to RWDSU (the Retail Wholesale and Department Store Union) and many other people and organizations. This coalition deserves credit for defeating Governor Cuomo’s terrible plan to give a highly profitable, famously tax-evading company billions in tax breaks to enrich developers and make Long Island City even less affordable for the many working-class people who live there.

It’s an astonishing victory for the working-class and the Left. The global elite sees it as a bewildering defeat, far beyond a local story.

Amazon’s decision to pull out of Long Island City was on the front page, not only of the New York Times but also the Wall Street Journal and the Financial Times, and all three papers have given it significant coverage, much of it hand-wringing from the business perspective: “how could this have gone so wrong?” Bourgeois commentators are blaming Amazon for mishandling the situation, the way a normal person might blame a victim of violent crime (“he was probably a drug dealer”; “why was she walking alone so late?”) to reassure themselves they’re safe.

Amazon wanted this deal. The governor wanted it. The mayor wanted it. Most importantly, the real estate industry wanted it: there was so much money to be made gentrifying Long Island City. Even as little as a year ago, nothing else would have mattered.

What worked for the Left here? “The organizing,” says Abdullah Younus of DSA.

The Left argues — a lot! — about the best approach to fighting capital. Should we focus on electing progressive or socialist-leaning politicians to office? Or should we build a base by talking to people about the issues? Public education or protest? Do we work with labor unions or with immigrant workers outside of such structures? Do we pressure politicians at the city or state level or organize working-class people in the community?

The lesson of the Amazon victory is, yes. All those things.

The recent electoral work by DSA and other groups turned out to be critical. In the 2018 midterms, we put people in office who were progressive. (Full disclosure: I volunteered on some of these campaigns.) New York City social democrats had done that before, with policy results ranging from abysmal to (at best) nothing-special liberalism.

But this time there’s a difference: political clarity. All DSA’s electoral work, says Younus, had a clear message: “We don’t want real estate money in our political system.”

The Left showed the success of sticking to this point when socialist Julia Salazar refused real estate money last fall and won her State Senate seat overwhelmingly. Her victory gave other progressive politicians the freedom, but also the obligation, to do the same. This is becoming, rightly, a litmus test for left electoralism in the city.

Politicians, Younus says, now know that if they get close to the real estate industry again, “organizations like DSA are going to pose an existential threat to them.”

The Amazon fight was a well-timed opportunity to hold the newly elected officials and their colleagues to this standard. The hostile skepticism toward the project from left-wing legislators — especially the state senators and Rep. Alexandria Ocasio-Cortez — was deeply unsettling to Amazon executives, who plainly expected local politicians to kiss their asses.

Electoral work — especially the successful campaigns of AOC and Salazar — had also given DSA and its allies roots and relationships in Queens and nearby communities. And it gave them canvassing infrastructure.

Activists went door-to-door in Long Island City, talking to residents about why the Amazon scheme was bad for the neighborhood, emphasizing Amazon’s anti-unionism, the planned billions in tax breaks, and gentrification. While many residents initially supported Amazon HQ2, those conversations changed many of their minds. People were encouraged to contact their elected representatives, come to protests and town hall meetings on the issue, and get involved in the anti-Amazon fight. Many did. There were also a number of rallies, as well as disruptive protests of City Council hearings on the deal.

Some unions displayed a disgraceful lack of solidarity, showing little interest in Amazon’s general anti-unionism and the broader interests of the working class, focused only on the crumbs they could wring for their own members from the deal. These bad apples are now rebuking the Left with Chamber of Commerce talking points from the 1980s (looking at you, SEIU 32BJ).

But leaving them aside, labor was central to this story. Organizers emphasized Amazon’s labor practices and anti-unionism in talking to the community, so elected officials began pressuring Amazon on the subject.

All of this work by the Left created a climate of hostility, where Amazon knew it would face public scrutiny, skeptical officials, and labor organizing. The company began to realize that in New York, a global media capital, it would face a constant public airing of all its worst qualities.

RWDSU, part of the anti-Amazon coalition and a vocal critic of the HQ2 deal, had a meeting with Cuomo and Amazon officials in which Amazon seemed to be make concessions on union organizing rights. Hours later, the company backed out of New York altogether.

On top of everything else, officials feared that allowing unionization in New York would leave them vulnerable to worker organizing elsewhere. New York City had become, as DSA’s Bianca Cunningham puts it, the “perfect enemy for the richest man in the world.”

Not what Jeff Bezos signed up for at this difficult time in his life.

The implications are immediate but also long-term. Locally, the consciousness organizers have raised and the relationships they’ve deepened offer hope that they can beat the real estate industry again.

“This infrastructure will help us,” says Cunningham, in upcoming battles over rent laws, for example. (It also puts the Left in a strong position for the Queens District Attorney race.)

In New York and nationwide, the HQ2 saga also shows how big capital can lose big fights — and how we can win.