Amazon abruptly dropped plans Thursday for a big new headquarters in New York that would have brought 25,000 jobs to the city, reversing course after politicians and activists objected to the nearly $3 billion in tax breaks promised to what is already one of the world's richest, most powerful companies.

"We are disappointed to have reached this conclusion — we love New York," the online giant from Seattle said in a blog post announcing its withdrawal.

The stunning move was a serious blow to Gov. Andrew Cuomo and Mayor Bill de Blasio, who had lobbied intensely to land the project, competing against more than 200 other metropolitan areas across the continent that were practically tripping over each other to offer incentives to Amazon in a bidding war the company stoked.

Cuomo lashed out at fellow New York politicians over Amazon's change of heart, saying the project would have helped diversify the city's economy, cement its status as an emerging tech hub and generate money for schools, housing and transit.

"A small group politicians put their own narrow political interests above their community," he said.

But Democratic Rep. Alexandria Ocasio-Cortez, New York City's new liberal firebrand, exulted over Amazon's pullout.

"Today was the day a group of dedicated, everyday New Yorkers and their neighbors defeated Amazon's corporate greed, its worker exploitation, and the power of the richest man in the world," she tweeted, referring to Amazon CEO Jeff Bezos.

The swift unraveling of the project reflected growing antipathy toward large technology companies among liberals and populists who accuse big business of holding down wages and wielding too much political clout, analysts said.

"This all of a sudden became a perfect test case for all those arguments," said Joe Parilla, a fellow at the Brooking Institution's Metropolitan Policy Project.

Amazon ultimately decided it did not want to be drawn into that battle.

Amazon announced in November that it had chosen the Long Island City section of Queens for one of two new headquarters, with the other in Arlington, Virginia. Both would get 25,000 jobs. A third site in Nashville, Tennessee, would get 5,000.

The company planned to spend $2.5 billion building the New York office, choosing the area in part because of its large pool of tech talent. The governor and the mayor had argued that the project would spur economic growth that would pay for the $2.8 billion in state and city incentives many times over.

De Blasio said that 48 hours before Amazon's announcement, he spoke with a senior company executive who gave no indication that there was a problem the deal. But Thursday morning, he got a call from an executive just as news started to come out that the deal was dead.

"I was flabbergasted," he told reporters in Boston, where he was taking part in a forum at Harvard's Kennedy School. "I said, 'Why on earth after all the effort we all put in would you simply walk away?'"

After Amazon backed out, the mayor criticized it for not doing more to try to win over New Yorkers, saying: "You have to be tough to make it in New York City."

In pulling out, Amazon said it isn't looking for a replacement location "at this time." It said it plans to spread the technology jobs that were slated for New York to other offices around the U.S. and Canada, including Chicago, Toronto and Austin, Texas. It will also expand its existing New York offices, which already have about 5,000 employees.

Amazon faced fierce opposition over the tax breaks, with critics complaining that the project was an extravagant giveaway — or worse, a shakedown — and that it wouldn't provide much direct benefit to most New Yorkers.

The list of grievances against the project grew as the months wore on, with critics complaining about Amazon's stance on unions and some Long Island City residents fretting that the company's arrival would drive up rents and other costs.

Opposition to the deal was led in the Democrat-controlled state Senate by Michael Gianaris, the chamber's No. 2 lawmaker, whose district includes Long Island City. Initially among the politicians who supported bringing an Amazon headquarters to the city, Gianaris did an about-face after the deal was announced, criticizing the secrecy surrounding the negotiations and the generous incentives.

Earlier this month, Gianaris was appointed to a little-known state panel that could have ultimately been asked to approve the subsidies.

It is unclear whether the City Council had any power to scuttle the deal. But City Council members held hearings at which they grilled Amazon officials about the company's labor practices, its contract with Immigration and Customs Enforcement to provide facial recognition technology and other issues.

Construction industry groups and some local business leaders had urged the public and officials to get behind the plan.

Eric Benaim, a realty executive who gets most of his sales and rentals in Long Island City, had led a petition in support of Amazon, drawing 4,000 signatures.

"I woke up this morning and I had no clue this would happen. Zero. This news is a shock, and I'm devastated," he said.

A Quinnipiac University poll released in December found New York City voters supported having an Amazon headquarters 57 percent to 26 percent. But they were divided over the incentives: 46 percent in favor, 44 percent against.

Andrew Ousley, a business owner who lives near the proposed site, said he had been considering moving out before Amazon moved in.

"Now that they're not coming, I'm more likely to stay and see how the neighborhood continues to grow and evolve in a more organic fashion," he said.

In recent weeks, a City Council leader whose district includes Long Island City tried to get Amazon officials to agree to remain neutral in the face of any potential union drive. But an Amazon executive would not give such a commitment.

Full statement from Amazon below:

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. 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. While polls show that 70% of New Yorkers support our plans and investment, a number of state and local politicians have made it clear that they oppose our presence and will not work with us to build the type of relationships that are required to go forward with the project we and many others envisioned in Long Island City.

We are disappointed to have reached this conclusion—we love New York, its incomparable dynamism, people, and culture—and particularly the community of Long Island City, where we have gotten to know so many optimistic, forward-leaning community leaders, small business owners, and residents. There are currently over 5,000 Amazon employees in Brooklyn, Manhattan, and Staten Island, and we plan to continue growing these teams.

We are deeply grateful to Governor Cuomo, Mayor de Blasio, and their staffs, who so enthusiastically and graciously invited us to build in New York City and supported us during the process. Governor Cuomo and Mayor de Blasio have worked tirelessly on behalf of New Yorkers to encourage local investment and job creation, and we can’t speak positively enough about all their efforts. The steadfast commitment and dedication that these leaders have demonstrated to the communities they represent inspired us from the very beginning and is one of the big reasons our decision was so difficult.

We do not intend to reopen the HQ2 search at this time. We will proceed as planned in Northern Virginia and Nashville, and we will continue to hire and grow across our 17 corporate offices and tech hubs in the U.S. and Canada.

Thank you again to Governor Cuomo, Mayor de Blasio, and the many other community leaders and residents who welcomed our plans and supported us along the way. We hope to have future chances to collaborate as we continue to build our presence in New York over time.

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. 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. While polls show that 70% of New Yorkers support our plans and investment, a number of state and local politicians have made it clear that they oppose our presence and will not work with us to build the type of relationships that are required to go forward with the project we and many others envisioned in Long Island City.

We are disappointed to have reached this conclusion—we love New York, its incomparable dynamism, people, and culture—and particularly the community of Long Island City, where we have gotten to know so many optimistic, forward-leaning community leaders, small business owners, and residents. There are currently over 5,000 Amazon employees in Brooklyn, Manhattan, and Staten Island, and we plan to continue growing these teams.

We are deeply grateful to Governor Cuomo, Mayor de Blasio, and their staffs, who so enthusiastically and graciously invited us to build in New York City and supported us during the process. Governor Cuomo and Mayor de Blasio have worked tirelessly on behalf of New Yorkers to encourage local investment and job creation, and we can’t speak positively enough about all their efforts. The steadfast commitment and dedication that these leaders have demonstrated to the communities they represent inspired us from the very beginning and is one of the big reasons our decision was so difficult.

We do not intend to reopen the HQ2 search at this time. We will proceed as planned in Northern Virginia and Nashville, and we will continue to hire and grow across our 17 corporate offices and tech hubs in the U.S. and Canada.

Thank you again to Governor Cuomo, Mayor de Blasio, and the many other community leaders and residents who welcomed our plans and supported us along the way. We hope to have future chances to collaborate as we continue to build our presence in New York over time.

___

Associated Press Writers Verena Dobnik, Karen Matthews, Kiley Armstrong in New York; Chris Rugaber in Washington; and Chris Carola and David Klepper in Albany, New York, contributed to this story.