It’s official: Amazon has anointed New York and Northern Virginia as locations for a major expansion , involving at least 25,000 employees and an investment of $5 billion.

The announcement is the culmination of an intense bidding war among 238 cities for Amazon’s promise of $50 billion in investment and 50,000 high-paying technology jobs. To land that deal, cities offered billions in tax breaks and incentives. According to the announcement, the company could score more than $2 billion in tax incentives from the two new sites.

In the end, only Amazon and other corporations won that war. By pitting cities against one another, Amazon created a frenzy of ever more lavish and outlandish offers. Maryland bid $6.5 billion in tax incentives and another $2 billion in infrastructure upgrades, and its transportation secretary at one point offered the company a “blank check.” Newark dangled $7 billion in front of Amazon. Columbus, Ohio, said it would waive all property taxes for 15 years. Chicago offered to let the company pocket between 50 and 100 percent of the income taxes its employees would pay to the city. Fresno, Calif., proposed giving Amazon joint control over deciding where to spend its taxes.

The problem is that once one city offers a company a lucrative deal, other employers want to get in on the bonanza. JPMorgan Chase’s chief executive, Jamie Dimon, said he would watch to see which city won the beauty contest and immediately call up those lawmakers and demand the same perks. Other companies are lining up to do the same.