Citing opposition from local politicians and community activists, Amazon abruptly announced Thursday that it has cancelled its plans to build its second headquarters in New York City.

"After much thought and deliberation, we've decided not to move forward with our plans to build a headquarters for Amazon in Long Island City, Queens," spokesperson Jodi Seth said. "For Amazon, the commitment to build a new headquarters requires positive, collaborative relationships with state and local elected officials who will be supportive over the long-term."

In November, Amazon announced it would build a huge complex in the borough of Queens to employ more than 25,000 people. It made that choice after a year-long process that saw hundreds of cities pitch the company on becoming the site of so-called HQ2. One Canadian city, Toronto, made the short list of 20 potential destinations, but ultimately wasn't selected.

While Amazon trumpeted opinion polls that suggest 70 per cent of New Yorkers support the project, the company's statement says a number of state and local politicians have made it clear they oppose Amazon's presence and will not work with the company to "build the type of relationships that are required to go forward with the project."

Opposition has keyed in on the $2.8-billion US worth of tax incentives the company was granted to set up in the city, at a time when other city services are starved for cash.

"This announcement ... shows the power of the people, even when taking on the world's richest man," said Deborah Axt, the co-executive director of anti-poverty group Make the Road New York. "Our members and allies stood firm against Governor Cuomo's plan to give away ... $3 billion in taxpayer giveaways so that Amazon could force its empire-building on our neighbourhoods."

Retail workers union RWDSU wasn't impressed with Amazon's reaction to the local concerns about the project, saying in a statement:

"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."

The United Food and Commercial Workers Union accuses the company of being anti-union, so they welcome the decision.

"Amazon showed its true colors today and every American should be outraged. Jeff Bezos had the opportunity to listen to the voices of working families and support the good-paying jobs New Yorkers deserve," UFCW President Marc Perrone said. "No company that refuses to invest in hardworking men and women should be allowed to stuff their pockets with taxpayer-funded subsidies."

Among the leading opponents of the plan on the political side was the newly minted congresswoman Alexandria Ocasio-Cortez, who represents New York's 14th District, right next to the bohemian but gentrifying 12th District in Queens where the sprawling complex was set to be built.

"Today was the day a group of dedicated, everyday New Yorkers & their neighbors defeated Amazon's corporate greed, its worker exploitation, and the power of the richest man in the world," she said on Twitter.

Can everyday people come together and effectively organize against creeping overreach of one of the world’s biggest corporations?<br><br>Yes, they can.<a href="https://t.co/DqQoL7VH7O">https://t.co/DqQoL7VH7O</a> —@AOC

Seth said there are no plans to have another search for a second headquarters. The company's existing New York-based operations in Brooklyn, Manhattan and Staten Island — which collectively employ 5,000 people — will not be impacted, or could even expand a little over time, Seth said.

"We will continue to hire and grow across our 17 corporate offices and tech hubs in the U.S. and Canada."