Will Amazon's HQ2 be a good neighbor or a nightmare? Editor's note: An earlier version of this video contained outdated population and incentive figures. (Video: Daron Taylor/The Washington Post, Photo: Daron Taylor/The Washington Post)

Amazon made it official Tuesday, announcing that it will build new headquarters in Northern Virginia and New York City, pledging to create 25,000 jobs at each site and ending a year of intense speculation and competition.

The company also announced that it has selected Nashville for 5,000 jobs as part of a new operations hub responsible for customer fulfillment, transportation, and supply-chain and similar activities.

Amazon to receive more than $2.8 billion in incentives from Va., N.Y., Tenn.

The choice of Crystal City in Arlington County as one of the winners cements Northern Virginia’s reputation as a magnet for business and will potentially reshape the Washington region into an eastern outpost of Silicon Valley over the next decade.

The triumph came with a price tag, details of which became public for the first time Tuesday after months of closed-door negotiations. Virginia Gov. Ralph Northam (D) and Arlington leaders agreed to give Amazon direct subsidies totaling $573 million based on the company creating 25,000 jobs with an average salary of $150,000.

The state and county also will invest a total of $223 million for transportation improvements that will benefit Amazon as well as the rest of the community, officials said.

“We are excited to build new headquarters in New York City and Northern Virginia,” Amazon founder and CEO Jeffrey P. Bezos said in a statement. (Bezos also owns The Washington Post.) “These two locations will allow us to attract world-class talent that will help us to continue inventing for customers for years to come. The team did a great job selecting these sites, and we look forward to becoming an even bigger part of these communities.”

In Crystal City, Virginia, commuters and residents wonder how Amazon's newest headquarters will change where they work and live. (Video: Jorge Ribas/The Washington Post)

The money, subject to approval by the Virginia General Assembly, also includes $195 million in transportation improvements to nearby Metro stations and to Reagan National Airport, as well as construction of a pedestrian bridge connecting the airport to company’s new hub — which will be in a newly branded neighborhood called “National Landing” encompassing parts of Pentagon City and Crystal City in Arlington and Potomac Yard in Alexandria.

Virginia’s tech talent and stable business environment were keys to landing the project, Northam said.

Standing in a Crystal City warehouse that will be redeveloped for the company, Northam vowed that with Amazon on the way, the complex of dated and largely vacant government office buildings will put the commonwealth “on the leading edge of the next technology and innovation breakthrough.”

Other states offered the company more money, and Northam paired the announcement of the deal with a plan to spend up to $1.1 billion over 20 years to expand tech education at the state’s community colleges and universities — allowing him to assert that the heavy majority of the spending would not benefit just Amazon.

Virginia Tech announced plans to build a $1 billion graduate campus in Alexandria focused on innovation.

“The vast majority of the commonwealth’s proposal represents investments in our people and our infrastructure that will align with Amazon’s long-term goal while supporting the growth and competitiveness of businesses all across Virginia,” Northam said.

Read Virginia’s agreement with Amazon

The decision hands Northam and local leaders the largest economic-development prize in a generation — one promising $2.5 billion in capital investments and $3.2 billion in net tax revenue over 20 years — but could also put pressure on the region’s already steep housing prices and congested roads, and its yawning divide between wealthy and low-income residents.

According to a 25-page agreement between the company and the state, Amazon expects to hire 400 people in 2019 and 1,180 the following year. It expects to create a minimum of 25,000 jobs by 2030 and potentially a total of 37,850 by 2034.

New York Mayor Bill de Blasio (D) and Gov. Andrew M. Cuomo (D) — who had joked that he would change his name to “Amazon Cuomo” if necessary to land the project — also claimed victory Tuesday.

New York leaders offered Amazon more money than Virginia — more than $1.5 billion, much of it also tied to the company’s job growth and salaries.

How can the D.C. region absorb Amazon if it can’t cope now with gridlock and housing costs?

The final suitors included the District, Montgomery County and 16 other jurisdictions Amazon considered since narrowing its list in January. D.C. Mayor Muriel E. Bowser (D) and Maryland Gov. Larry Hogan (R) both applauded the announcement.

Neither will have to pony up incentives to the company, but experts say both should see economic gains as a result. Bowser called on regional leaders to create concrete affordable-housing goals to address an acute problem that economists say is likely to worsen as Amazon grows.

“Amazon in Arlington is a win for D.C.,” Bowser said in a statement. “We will continue preparing residents with the skills and knowledge they need for the jobs of the future, including at Amazon.”

Maryland officials had offered one of the richest known incentive packages, at $8.5 billion. Sen. Benjamin L. Cardin (D-Md.) said that while he was “rooting for Montgomery County,” Amazon’s investment would draw many new residents to Maryland.

Hogan said he expects to see other companies relocate to the state for proximity to Amazon. “Collectively, we will not only gain 25,000 corporate-level jobs, but also many businesses that are part of Amazon’s supply chain,” Hogan said.

Northern Va. property owners are delighted Amazon is moving in. Renters, first-time buyers and low-income residents aren’t.

Opposition to the move started shortly after the announcement, however, as groups dedicated to fighting inequality and opposed to corporate subsidies began rallying their supporters in New York and Virginia as details of the deal began to emerge.

“We’ve been getting calls and outreach from Queens residents all day about this. The community’s response? Outrage,” said Rep.-elect Alexandria Ocasio-Cortez (D-N.Y.), who will take office in January.

Washington won its piece of Amazon. Now comes the hard part.

Many were concerned about the impact on the cost of living and questioned why a company run by Bezos — the world’s wealthiest person — needed any public funds.

But Cuomo said the benefits dwarf the subsidies.

“The revenue-to-incentive ratio is 9-to-1. That is the highest rate of return for an economic incentive program that the state has ever offered,” Cuomo said. He contrasted it with the return from the state’s film tax credit, which he said brings the state $1.15 for every $1 it invests.

Similar concerns emerged in Virginia.

“Thousands of new high-paying jobs could be a boon to our community, but we deserve to know the cost,” said Anna Scholl, executive director of the advocacy group Progress Virginia. “Tens of thousands of new workers and their families are sure to strain community resources when it comes to affordable housing, mass transit and traffic, and quality local schools. It’s only right that Amazon pay their fair share.”

Residents in the nearby Del Ray neighborhood expressed concerns earlier this year that Amazon’s arrival would worsen daily rush-hour backups that already slow traffic to a crawl and would erode the quality of life in their neighborhood of mostly single-family homes.

Jay Carney, Amazon’s senior vice president of worldwide corporate affairs, said that the company considered all the locations carefully and reviewed 100 metrics but ultimately made its decision — including the choice to split the project — based on how best the company could recruit the talent it needs.

“We came to realize that of course these are two fantastic metropolitan areas, and each of the areas has an existing pool of talent and are fantastic places to live,” he said in a phone interview.

How Crystal City, the future home of Amazon’s new headquarters, got its name

Carney said that Amazon would apply some of the lessons it had learned from its growth in Seattle — where housing costs rose dramatically during the company’s expansion — to its new locations. He said Bezos was “involved very deeply” in the process and was in every leadership meeting where it was discussed.

Amazon’s decision to split the project rather than open a second headquarters on par with its Seattle campus has angered some who said the company had ginned up competition among cities only to change the rules midstream. Some said it was unfair that the company seemed to consider only sites in more-affluent communities.

“One thing that’s different here is we are planning in advance with these cities,” Carney said. “Amazon started in a garage. Nobody foresaw, not even Jeff, when they got launched that Amazon would become what it became or that we would have tens of thousands of employees in Seattle alone.”

Amazon launched the project in fall 2017, dubbing it “HQ2” and issuing search criteria for “a second corporate headquarters” with as many as 50,000 jobs and an investment of $5 billion.

Although 238 locations initially submitted proposals to Amazon, many experts considered the Washington region a favorite from the outset because of Bezos’s personal connections in the region, particularly the $23 million mansion he purchased in the city’s Kalorama neighborhood last year and his ownership of The Post.

Carney said those were not among the 100 metrics the company looked at. “It’s not a factor,” he said. “He lives in Seattle. He has a family there.”

In picking Crystal City, Amazon opted for a close-in suburban site, just across the Potomac River from Washington and a half-mile from National Airport.

Amazon could be boon or bust for Metro and the region’s transportation infrastructure

Among the announced transportation improvements are new access points to the Crystal City Metro station and the planned Potomac Yard station. Amazon also wants a helipad, and Arlington has said that the county staff will help obtain the necessary local, state and federal approval, according to a letter from County Manager Mark Schwartz that was released with other information about the deal.

Since launching the high-profile search last year, Bezos and the company made several announcements that some expected would soften Amazon’s image as it moved to open its second hub.

Bezos announced in September that he would donate $2 billion of his own money to support groups battling homelessness in the United States and to create a network of preschools in underserved communities.

In October, after bearing months of criticism from Sen. Bernie Sanders (I-Vt.) over its treatment of workers, Amazon announced that it would raise its minimum wage for all employees to $15 per hour, although the decision is not likely to have much effect on the company’s hiring in Northern Virginia.

The expected windfall from the development will not immediately solve local governments’ budget woes, either. Schwartz said Arlington County is still considering layoffs and budget cuts in the coming year.

“Everybody thinks it’s going to be this magical elixir right away,” he said.

Patricia Sullivan, Michael Laris and Fenit Nirappil in Washington and Gregory S. Schneider in Richmond contributed to this report.