NEW YORK – Amazon built a retail empire on low prices and free shipping. But for taxpayers, its new headquarters did not come cheap.

New York and Virginia collectively offered more than $2 billion in tax credits, rebates and other incentives to attract the company. That figure does not include what could amount to hundreds of millions of dollars in infrastructure spending, worker training and other government assistance.

Economists have long criticized tax incentives as inefficient and unnecessary, arguing that they pit cities or states against each other and leave less money for education and public works that ultimately do more to lift local economies and improve livelihoods. Research has shown that incentives play at most a small role in corporate decisions, meaning governments often end up paying businesses to do what they would have done anyway.

Indeed, in selecting New York and Virginia for its new locations, Amazon turned down seemingly richer offers just next door. Maryland and New Jersey each offered multibillion-dollar incentive packages that dwarfed the ones Amazon accepted.

“An additional $7.5 billion in subsidies wasn’t enough to get Amazon to move across the river,” said Michael Farren, an economist at the Mercatus Center, a libertarian think tank, referring to the difference between Maryland’s offer of $8.5 billion and Virginia’s of less than $1 billion. “That just says that subsidies were never what mattered in the first place.”

Opportunity lost: That’s biggest negative for Triangle’s Amazon HQ2 failure

In its announcement Tuesday, Amazon said that “attracting top talent was the leading driver” of its decision. Incentives were “one factor,” it said, but a secondary one.

New York’s incentive package is much larger than Virginia’s. Amazon promised to create about 25,000 jobs at each location, but New York offered twice as much as Virginia did.

“That’s the first thing we said,” said Maria Doulis, vice president of the nonpartisan Citizens Budget Commission, which has offices in New York City and Albany. “We’re like, ‘Wait, you’re splitting this down the middle — why does it look like we’re paying so much?’ ”

Amazon makes it official: New York, northern Virginia each to land 25,000 jobs

New York promised Amazon $1.525 billion in incentives, including $1.2 billion over the next 10 years as part of the state’s Excelsior tax credit. The state also pledged to help Amazon with infrastructure upgrades, job-training programs and even assistance “securing access to a helipad” — none of which came with a price tag.

Virginia promised Amazon an incentive package worth $573 million, including $550 million in cash grants — $22,000 per job. The state also pledged $250 million to help Virginia Tech build a campus in Alexandria, near the Amazon site in Arlington, offering degrees in computer science and software engineering. (Virginia, too, offered to help the company get a helipad.)

New York has a history of offering generous incentive packages, including a 2007 deal for subsidized electricity to keep an Alcoa plant that was worth $5.6 billion over 30 years, according to Good Jobs First, which tracks corporate subsidies.

On a per-job basis, New York’s offer to Amazon is about typical for the state but well above the national average for such deals, said Timothy J. Bartik, an economist for the Upjohn Institute in Kalamazoo, Michigan, who has studied tax incentives.

“New York’s following its usual practices,” Bartik said. “It hands out a lot of hefty incentives, a lot of long-term incentives.”

Gov. Andrew Cuomo defended the deal, arguing that New York has to offer incentives because of its comparatively high taxes. At 6.5 percent, New York’s corporate income-tax rate is only modestly higher than Virginia’s 6 percent, according to the Tax Foundation. But other business and individual taxes are higher in New York.

“It’s not a level playing field to begin with,” Cuomo said Tuesday. “All things being equal, if we do nothing, they’re going to Texas.”

Federal tax breaks

Amazon’s New York site could also qualify for federal tax breaks under the tax law passed by Republicans last year. That law created a program to encourage development in so-called opportunity zones, including parts of Long Island City.

New York City did not offer any special tax breaks to Amazon as part of the deal. But the company will be able to take advantage of existing city tax credits, including a program designed to encourage companies to create jobs outside the busiest parts of Manhattan. The program, open to all companies, could be worth as much as $900 million to Amazon over 12 years, on top of the state incentives.

Doulis, of the Citizens Budget Commission, said that credit and similar ones might have outlived their usefulness. In the 1980s and ‘90s, she said, companies were taking a risk by expanding in Queens or Brooklyn, and tax breaks provided an important inducement. But today, Long Island City is a rapidly developing neighborhood full of hip bars and luxury apartment complexes.

“That neighborhood was very different 25 years ago,” she said. “We’re in a very different world now.”

Still, Doulis said Amazon’s arrival was a major coup for the city, which has tried to establish itself as a tech hub to rival Boston, Seattle and even Silicon Valley. Cuomo and Mayor Bill de Blasio on Tuesday said Amazon’s decision was a vindication of that strategy, which the mayor said would benefit all New Yorkers.

Good investments?

Tom Stringer, who advises companies on site-selection decisions for the consulting firm BDO, said high-cost places like New York and Virginia needed to offer incentives to compete with cheaper areas. And he said the deals would pay off in the long run in jobs and tax revenues.

“Incentives are not subsidies,” Stringer said. “They are investments.”

But it is not clear they are good investments, said Jay Shambaugh, director of the Hamilton Project at the Brookings Institution. In offering incentives to Amazon, he said, New York and Virginia are effectively subsidizing a big, incumbent company at the expense of local businesses and startups. That is especially concerning, he added, when entrepreneurship rates are falling and cities are struggling to nurture homegrown businesses.

That could be a particularly bitter pill for local retailers, many already struggling to compete with Amazon, said Stacy Mitchell, co-director of the Institute for Local Self-Reliance, an advocacy group long critical of Amazon.

“If you’re a local retailer or small manufacturer or artist or writer or publisher, you’re watching as your city and state hands your tax dollars to your most ferocious antagonist,” she said.

Alexandria Ocasio-Cortez, a Democrat who will represent parts of Queens in the House of Representatives starting in January, was one of several elected officials to criticize the deal. In a series of posts on Twitter, Ocasio-Cortez said a company of Amazon’s size shouldn’t “receive hundreds of millions of dollars in tax breaks at a time when our subway is crumbling and our communities need MORE investment.” But even many critics of tax incentives said the packages offered to Amazon were less egregious than some past examples. The New York and Virginia tax credits are tied to the number of jobs the company actually creates.

On a per-job basis, the packages offered to Amazon are smaller than some previous megadeals. For example, Wisconsin last year offered the Taiwanese electronics manufacturer Foxconn $3 billion in incentives for a project meant to employ 13,000 workers, at wages far lower than those promised by Amazon. The Foxconn deal, which has since grown even more expensive, has produced a public backlash in Wisconsin.

There are signs that Amazon may have been concerned about a similar reaction. The company did not choose the biggest incentive packages on offer, and in an unusual move, it included details of the tax breaks in its news release. And Greg LeRoy, executive director of Good Jobs First, noted that Amazon conducted the final stages of its search behind closed doors after a much more public search earlier in the process.

“They would have had another whole wave of blowback if they’d had another hunger games,” LeRoy said.