Image copyright Getty Images Image caption Incentives promised to Amazon angered opponents

Amazon has said it will not build a new headquarters in New York, citing fierce opposition from state and local politicians.

The dramatic turnabout comes just months after the firm named New York City one of two sites selected for major expansion over the next decades.

City and state leaders had agreed to provide about $3bn (£2.3bn) in incentives to secure that investment.

Those subsidies had prompted fierce backlash in some quarters.

Amazon said its plans to build a new headquarters required "positive, collaborative relationships with state and local elected officials who will be supportive over the long term".

It said: "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.

"We are disappointed to have reached this conclusion."

In November, Amazon announced plans to invest about $2.5bn and add more than 25,000 "high-paying" jobs at campuses in New York and near Washington DC over the next two decades.

The news capped a 14-month search for a new site that saw cities and towns across North America competing to woo the e-commerce giant.

Image copyright EPA Image caption Long Island City, where Amazon was planning expansion, is one of the fastest growing areas in New York

In New York, Governor Andrew Cuomo and Mayor Bill DeBlasio championed the project, which Amazon said would generate more than $10bn in new tax revenue in New York.

Polls had found that a majority of New Yorkers also supported Amazon's plan.

However, it drew opposition from unions, members of the City Council and others, including newly elected Rep Alexandria Ocasio-Cortez, angry over the billions in incentives promised to one of the world's most valuable companies.

The risk of rising rents, which have spurred tensions in Amazon's hometown of Seattle, were also a concern.

Opponents celebrated Amazon's decision on Thursday.

"When our community fights together, anything is possible, even when we're up against the biggest corporation in the world," Council Member Jimmy Van Bramer said.

"Defeating an unprecedented act of corporate welfare is a triumph that should change the way we do economic development deals in our city and state forever."

Amazon supporters said the critics were short-sighted. They said they were worried about the long-term economic consequences as populist messages appear to gain traction.

"The New York Senate has done tremendous damage," Gov Cuomo said. "They should be held accountable for this lost economic opportunity."

No new search

Amazon currently employs more than 5,000 people across New York City. It said it expected its staff numbers in the region to continue to grow.

The firm said it would not look for an alternative headquarters site, but would move forward as planned at the site near the Pentagon in Northern Virginia.

It will also distribute its growth across its offices in the US and Canada.

Amazon is also due to receive incentives for the new campus in Virginia, but that package, which is less generous than the one promised in New York, has been less controversial.

Frank Raffaele owns Coffeed, a small chain of coffee shops that started in Long Island City, the neighbourhood where Amazon was expected to expand.

He said he was disappointed the project had been dropped over "political posturing".

"This was transformative for New York and the fact that it's not going to happen anymore is extremely sad," he said. "This was our chance to shine."

Patience wears thin for Amazon

By Natalie Sherman, BBC News, New York

Amazon may have expected its search for "HQ2" to go smoothly.

After all, the firm has won billions in incentives from cities and states, and plenty of good PR, over the last decades by promising jobs at its warehouses. Now it was offering a headquarters.

But the subsidies that local officials have lavished on corporations like Amazon in recent years have tested the public's patience.

And opponents especially questioned the need to use such incentives to spur expansion in Long Island City - one of the fastest-growing areas of one of the country's most successful cities.

Polls showed support among the public, but Amazon, which prides itself on being a nimble business despite its size, didn't become a giant by embracing battles with the potential to tarnish its consumer-focused brand.

All the more reason to back away.