Amazon officials had already started emotionally investing in their future in Long Island City by the time Jeff Bezos and his leadership team at Amazon decided Wednesday night to pull the plug on their planned headquarters in the Queens, New York, neighborhood.

"We'd found our favorite restaurant" — Manducatis, a 40-year-old family-run Italian restaurant — "and we were looking at ways to make a positive impact on the community, to work together with small business owners and make a difference there," Jodi Seth, the head of policy communications for Amazon, told NBC News on Thursday.

But three months of sustained opposition from state and local officials, including Rep. Alexandria Ocasio-Cortez, D-N.Y., finally drove Amazon to cancel its plan to build a new campus in Long Island City, across the East River from Manhattan — and put an end to potentially 25,000 jobs the move might have brought to New York City.

"It wasn't any one incident," Seth said in an interview. "It was that the environment over the course of the past three months had not got any better. There were some local and state elected officials who refused to meet with Amazon and criticized us day in and day out about the plan."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Seth said it came down to a long-term environment that Amazon did not care to work in, in part because different politicians put forward different reasons for opposing the project.

"If you talk to Alexandria Ocasio-Cortez, it's 'Never Amazon,'" Seth said. "If you talk to [New York City Councilman Jimmy] Van Bramer, it's unions." (New York is still a heavily unionized town, and Amazon's opposition to unions was frequently cited by those who fought the project.)

The main frustration for opponents of Amazon's project was the $3 billion that the company had been awarded in state and city incentives — a cost that opponents said would have been paid for by New York residents. Many also feared that the move would lead to gentrification and higher housing prices.

Following Amazon's announcement, Ocasio-Cortez, who represents a district adjacent to the project, commended "dedicated, everyday New Yorkers & their neighbors" for defeating "Amazon’s corporate greed, its worker exploitation, and the power of the richest man in the world."

Champions of the deal, including New York Gov. Andrew Cuomo, said that the creation of those 25,000 new jobs, plus revenue from property taxes, corporate taxes and personal income taxes, would have benefited Long Island City and New York in the long term.

In a statement Thursday, Cuomo criticized the "small group of politicians" who opposed the headquarters and put their own "narrow interests above their community."

Even with support from some officials, Bezos and his team concluded that it wasn't worth sticking around for the fight. Seth noted that a vote on the move by the State Public Authorities Control Board wasn't scheduled until April or May 2020.

"We wouldn't have even known if the deal would be approved until a year from now," she said. "We were pretty confident the deal would be approved, in that the governor was working hard to make it happen, but looking at the opposition and the timeline we decided we don't want to work in this environment in the long term."

Amazon currently employs 8,000 people in New York and says it will continue to expand its corporate offices in Manhattan over time. But the company offered no plan to find another headquarters for those 25,000 jobs, and Seth said Amazon has no intention of re-opening talks with New York state and local officials.

"That's pretty firm," Seth said.