Amazon’s decision to cancel its plans to build a second corporate headquarters in New York City came after left-wing activists and politicians demanded that the company advance their immigration agenda in exchange for nearly $3 billion in government subsidies.

Democratic socialism advocates and New York politicians, emboldened by the leftward lurch of the Democrat Party, which the election of Rep. Alexandria Ocasio-Cortez (D-NY) crystallized, stepped up their demands on Amazon in recent weeks, according to a person briefed on the matter. One such demand included that the company pledge not to cooperate with U.S. Immigration and Customs Enforcement (ICE).

Amazon refused to say it would not cooperate with U.S. immigration laws, the person said.

Critics of the deal Amazon had reached with New York’s Gov. Andrew Cuomo and New York City Mayor Bill de Blasio often cite the nearly $3 billion in subsidies promised to the company as fueling their opposition. But on Thursday, New York State Sen. Michael Gianaris confirmed that immigration was a key reason he and others opposed Amazon’s plans.

“They came in, they proudly, unabashedly told us they wanted to work with ICE to deport undocumented immigrants in this country,” Gianaris said in an interview with CNBC.

Gianaris, the deputy majority leader of New York’s State Senate, is a Democrat who represents the Queens waterfront district where Amazon had planned to build its campus. He was nominated this month to a seat on the Public Authorities Control Board, a little-known state government panel that held veto rights over the Amazon deal. He has also called for the abolition of ICE.

Gianaris’s district overlaps that of Ocasio-Cortez, a proponent of abolishing ICE and one of the most prominent opponents of the Amazon deal. On Thursday, Ocasio-Cortez celebrated Amazon’s retreat from New York this week.

Anything is possible: 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. https://t.co/nyvm5vtH9k — Alexandria Ocasio-Cortez (@AOC) February 14, 2019

Gianaris came to prominence for his opposition to a group of Democrat State Senators known as the Independent Democratic Conference (IDC), who cooperated with New York Republicans. The IDC is now defunct.

“Since then, Gianaris has cast himself as a true progressive — a dynamic that has only become more apparent since Ms. Ocasio-Cortez’s victory last summer over her predecessor, Joseph Crowley,” the New York Times reported in February.

Registering voters with Team @Ocasio2018 in Woodside pic.twitter.com/NXYWuguW56 — Sen. Mike Gianaris (@SenGianaris) August 7, 2018

Ocasio-Cortez and Gianaris were not alone in opposing Amazon for its unwillingness to declare it would not cooperate with federal immigration law.

“I want the deal to be scrapped in its entirety,” City Councilman Jimmy Van Bramer of Queens said prior to the announcement that Amazon would pull out of New York. “They want to crush unions. They want to work with ICE. They want to bypass community review. They want to take giant subsidies. I don’t see them changing one bit and so, yeah, they’re not welcome here.”

This was not a populist uprising against a big business seeking subsidies. According to polling data, most Queens residents supported Amazon’s move to New York, but their voices were overwhelmed by the activists. Among black voters, 70 percent supported the Amazon deal, while only 25 percent objected. Among Latinos, 81 percent supported Amazon with only 17 percent opposing. Whites were less enthusiastic, with just 51 percent favoring and 40 percent opposing.

“A small group of politicians put their own narrow political interests above their community — which poll after poll showed overwhelmingly supported bringing Amazon to Long Island City — the state’s economic future and the best interests of the people of this state,” Cuomo said in a statement.