Amazon is canceling its controversial plan to build a new corporate campus in the Long Island City neighborhood of Queens. The plan, which included almost $3 billion in subsidies and tax breaks, provoked a grassroots backlash.

"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," Amazon said in a statement. "While polls show that 70 percent 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."

In 2017, Amazon announced that a single city would be chosen for Amazon's "HQ2," a second headquarters that would be an equal of Amazon's original Seattle location and employ as many as 50,000 people. But Amazon ultimately decided to split this "headquarters" up into two pieces, announcing plans to build one campus in the Virginia suburbs of Washington, DC and the other in Queens. Each location was slated to get around 25,000 new jobs.

Virginia officials quickly signed off on Amazon's plans for a campus in Arlington, Virginia, which included a comparatively modest $750 million in state incentives.

But the New York proposal attracted stiffer opposition. Activists warned that the new campus would drive up housing costs and worsen inequality. And they objected to giving one of the world's most valuable companies—run by the world's wealthiest man—billions of dollars in subsidies and tax breaks.

If Amazon had decided to press forward with its New York plans, it would have had a major political fight on its hands. Governor Andrew Cuomo and Mayor Bill de Blasio consistently supported the plan, but other elected officials in New York City, New York state, and New York's congressional delegation criticized Amazon's arrival. Expanding in the face of those objections could have tarnished Amazon's brand.

Amazon says that it's not going to look for another location to replace the New York campus. The company is planning to move forward with its Virginia expansion. Amazon didn't say if the cancellation of the New York plan would lead to a larger expansion in Virginia.