What to Know Amazon confirmed it plans to split its new headquarters, dubbed HQ2, between New York City and Northern Virginia

The announcement ends a year-long courtship by cities and metropolitan areas across North America

Also Tuesday, Amazon announced a smaller, third investment in Nashville — another finalist city

Amazon is moving into New York City and Northern Virginia.

The company announced Tuesday it plans to locate its new "HQ2" headquarters in both areas, ending a year-long courtship by metropolitan areas across North America. Each location will receive $2.5 billion in economic investment and see 25,000 new jobs, Amazon said.

The company selected the Long Island City neighborhood of Queens in New York and the National Landing neighborhood of Washington suburb Arlington., Virginia. Both sit just outside massive urban centers and both emerged as late favorites in the search.

"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," CEO Jeff Bezos said in a statement.

Also Tuesday, Amazon announced a smaller, third investment another finalist city — in Nashville, Tennessee. It will become home to Amazon's East Coast operations hub and create 5,000 jobs, Amazon said.

"Our Retail Operations division handles customer fulfillment, customer service, transportation, and supply chain, amongst others," Amazon said. "The Operations Center of Excellence will be the Eastern U.S. regional hub for the tech and management functions of this division. It will be located in downtown Nashville just north of The Gulch."

Amazon launched its search for a second headquarters in September 2017. Four months later, the pool of 238 bids was narrowed to 20 finalists. Amazon originally said it would spend $5 billion and employ 50,000 workers in one winning area, but opted to split those investments between Long Island City and Arlington.

Earlier reports identified the Crystal City neighborhood of Arlington, just west of Ronald Reagan Washington National Airport, as a potential HQ2 pick. National Landing is a branded neighborhood encompassing Crystal City and adjacent areas.

Amazon confirms New York City, North Virginia for HQ2 sites from CNBC.

Amazon said it chose two locations rather than one to better attract top talent. It said the average salary for new jobs created in New York, Arlington and Nashville will exceed $150,000 per year.

The company said it will receive up to $2.2 billion in performance-based incentives from the three areas: $1.5 billion associated with its investment in Long Island City, $573 million in Arlington and up to $102 million in Nashville. The incentives take the form of cash grants and tax credits, and some take effect over time.

Many lawmakers and local residents criticized New York's committed incentives, in particular, arguing city and state officials should be allocating money for subway repairs and public services instead.

Recently elected U.S. Rep. Alexandria Ocasio-Cortez, who will represent the Bronx and parts of Queens, tweeted late Monday saying the tax breaks have concerned local residents.

"Amazon is a billion-dollar company," Ocasio-Cortez said in the tweet. "The idea that it will receive hundreds of millions of dollars in tax breaks at a time when our subway is crumbling and our communities need MORE investment, not less, is extremely concerning to residents here."

"We don't have this kind of money. We're going to make this kind of money from this transaction," New York Governor Andrew Cuomo said at a press conference following the announcement. "For every dollar we invest we're going to get back about $9, give or take, so to find the money that we need to invest in the subways, invest in the schools, etc., this is a big money maker for us."

Divided response

Speculation around hefty investments and planned developments in each area have polarized lawmakers and residents, with some championing Amazon's interest and commitment, and others cautioning against rising housing costs and uncertainty for families.

Ocasio-Cortez said on Twitter Monday that Amazon moving in could displace existing residents.

"Displacement is not community development. Investing in luxury condos is not the same thing as investing in people and families," Ocasio-Cortez said in another tweet. "Shuffling working class people out of a community does not improve their quality of life."

Some of the earliest investments from Amazon will be put toward infrastructure development in the larger neighborhood, rather than Amazon's specific campus, New York City Mayor Bill de Blasio said at the press conference.

"We don't — in the public sector, in the city of New York — we don't measure success in corporate profits. We measure success in how many everyday people benefit," de Blasio said. "This plan, that we all put together, we're convinced is going to benefit everyday New Yorkers in huge numbers, tens of thousands, and it's going to be something that really transforms people's lives."

Amazon said economic incentives were "one factor in our decision," but not the main driver, and offered links to download the company's agreements with each local government.

State Senator Michael Gianaris and City Council Member Jimmy Van Bramer, representatives for Long Island City, said Tuesday they have "serious reservations" about the deal.

"Offering massive corporate welfare from scarce public resources to one of the wealthiest corporations in the world at a time of great need in our state is just wrong," the officials said in a joint statement. "The burden should not be on the 99 percent to prove we are worthy of the 1 percent's presence in our communities, but rather on Amazon to prove it would be a responsible corporate neighbor ... We were not elected to serve as Amazon drones. It is incumbent upon us to stand up on behalf of the people we represent and that is what we intend to do."

U.S. Sen. Mark Warner, D-Va., praised the choice, saying in a statement the Arlington headquarters would have a positive impact on the D.C. region and state as a whole.

"We've seen that major investments like these can bring not only thousands of direct jobs but also lead to job growth in other industries," Warner said. "As we welcome Amazon's new investment in Virginia, we must commit to implementing this announcement in a way that will benefit the whole region and all of the Commonwealth."

Here's Amazon's full announcement:

Amazon today announced that we have selected New York City and Arlington, Virginia, as the locations for our new headquarters. Amazon will invest $5 billion and create more than 50,000 jobs across the two new headquarters locations, with more than 25,000 employees each in New York City and Arlington. The new locations will join Seattle as the company's three headquarters in North America. In addition, Amazon announced that it has selected Nashville for a new Center of Excellence for its Operations business, which is responsible for the company's customer fulfillment, transportation, supply chain, and other similar activities. The Operations Center of Excellence in Nashville will create more than 5,000 jobs.

The new Washington, D.C. metro headquarters in Arlington will be located in National Landing, and the New York City headquarters will be located in the Long Island City neighborhood in Queens. Amazon's investments in each new headquarters will spur the creation of tens of thousands of additional jobs in the surrounding communities. Hiring at both the new headquarters will begin in 2019. The Operations Center of Excellence will be located in downtown Nashville as part of a new development site just north of the Gulch, and hiring will also begin in 2019.

"We are excited to build new headquarters in New York City and Northern Virginia," said Jeff Bezos, founder and CEO of Amazon. "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."

Amazon in Long Island City in New York City

Located just across the East River from Midtown Manhattan and the Upper East Side, Long Island City is a mixed-use community where arts and industry intersect. It is a diverse community with a unique blend of cultural institutions, arts organizations, new and converted housing, restaurants, bars, breweries, waterfront parks, hotels, academic institutions, and small and large tech sector and industrial businesses. Long Island City has some of the best transit access in New York City, with 8 subway lines, 13 bus lines, commuter rail, a bike-sharing service, and ferries serving the area, and LaGuardia and JFK airports are in close proximity. As part of Amazon's new headquarters, New York and Long Island City will benefit from more than 25,000 full-time high-paying jobs; approximately $2.5 billion in Amazon investment; 4 million square feet of energy-efficient office space with an opportunity to expand to 8 million square feet; and an estimated incremental tax revenue of more than $10 billion over the next 20 years as a result of Amazon's investment and job creation. Amazon will receive performance-based direct incentives of $1.525 billion based on the company creating 25,000 jobs in Long Island City. This includes a refundable tax credit through New York State's Excelsior Program of up to $1.2 billion calculated as a percentage of the salaries Amazon expects to pay employees over the next 10 years, which equates to $48,000 per job for 25,000 jobs with an average wage of over $150,000; and a cash grant from Empire State Development of $325 million based on the square footage of buildings occupied in the next 10 years. Amazon will receive these incentives over the next decade based on the incremental jobs it creates each year and as it reaches building occupancy targets. The company will separately apply for as-of-right incentives including New York City's Industrial & Commercial Abatement Program (ICAP) and New York City's Relocation and Employment Assistance Program (REAP). The community will benefit from New York City providing funding through a Payment In Lieu Of Tax (PILOT) program based on Amazon's property taxes on a portion of the development site to fund community infrastructure improvements developed through input from residents during the planning process. Amazon has agreed to donate space on its campus for a tech startup incubator and for use by artists and industrial businesses, and Amazon will donate a site for a new primary or intermediary public school. The company will also invest in infrastructure improvements and new green spaces. "When I took office, I said we would build a new New York State – one that is fiscally responsible and fosters a business climate that is attractive to growing companies and the industries of tomorrow. We've delivered on those promises and more, and today, with Amazon committing to expand its headquarters in Long Island City, New York can proudly say that we have attracted one of the largest, most competitive economic development investments in U.S. history," said Governor Andrew M. Cuomo of New York. "With an average salary of $150,000 per year for the tens of thousands of new jobs Amazon is creating in Queens, economic opportunity and investment will flourish for the entire region. Amazon understands that New York has everything the company needs to continue its growth. The State's more than $100 billion transportation infrastructure program – the most ambitious in our history – combined with our education initiatives like K-12 tech education and the first-in-the-nation Excelsior Scholarship program, will help ensure long-term success and an unrivaled talent pool for Amazon."

"This is a giant step on our path to building an economy in New York City that leaves no one behind. We are thrilled that Amazon has selected New York City for its new headquarters," said Mayor Bill de Blasio of New York City. "New Yorkers will get tens of thousands of new, good-paying jobs, and Amazon will get the best talent anywhere in the world. We're going to use this opportunity to open up good careers in tech to thousands of people looking for their foothold in the new economy, including those in City colleges and public housing. The City and State are working closely together to make sure Amazon's expansion is planned smartly, and to ensure this fast growing neighborhood has the transportation, schools, and infrastructure it needs."

Amazon in National Landing in Arlington, Virginia

National Landing is an urban community in Northern Virginia located less than 3 miles from downtown Washington, D.C. The area is served by 3 Metro stations, commuter rail access, and Reagan National Airport – all within walking distance. The community has a variety of hotels, restaurants, high-rise apartment buildings, retail, and commercial offices. National Landing has abundant parks and open space with sports and cultural events for residents of all ages throughout the year. As part of Amazon's new headquarters, Virginia and Arlington will benefit from more than 25,000 full-time high-paying jobs; approximately $2.5 billion in Amazon investment; 4 million square feet of energy-efficient office space with the opportunity to expand to 8 million square feet; and an estimated incremental tax revenue of $3.2 billion over the next 20 years as a result of Amazon's investment and job creation. Amazon will receive performance-based direct incentives of $573 million based on the company creating 25,000 jobs with an average wage of over $150,000 in Arlington. This includes a workforce cash grant from the Commonwealth of Virginia of up to $550 million based on $22,000 for each job created over the next 12 years. Amazon will only receive this incentive if it creates the forecasted high-paying jobs. The company will also receive a cash grant from Arlington of $23 million over 15 years based on the incremental growth of the existing local Transient Occupancy Tax, a tax on hotel rooms. The community and Amazon employees will benefit from the Commonwealth investing $195 million in infrastructure in the neighborhood, including improvements to the Crystal City and the Potomac Yards Metro stations; a pedestrian bridge connecting National Landing and Reagan National Airport; and work to improve safety, accessibility, and the pedestrian experience crossing Route 1 over the next 10 years. Arlington will also dedicate an estimated $28 million based on 12% of future property tax revenues earned from an existing Tax Increment Financing (TIF) district for on-site infrastructure and open space in National Landing. "This is a big win for Virginia – I'm proud Amazon recognizes the tremendous assets the Commonwealth has to offer and plans to deepen its roots here," said Governor Ralph Northam of Virginia. "Virginia put together a proposal for Amazon that we believe represents a new model of economic development for the 21st century, and I'm excited to say that our innovative approach was successful. The majority of Virginia's partnership proposal consists of investments in our education and transportation infrastructure that will bolster the features that make Virginia so attractive: a strong and talented workforce, a stable and competitive business climate, and a world-class higher education system."

"We are proud that Amazon has selected National Landing for a major new headquarters. This is, above all, a validation of our community's commitment to sustainability, transit-oriented development, affordable housing, and diversity," said Arlington County Board Chair Katie Cristol. "The strength of our workforce coupled with our proximity to the nation's capital makes us an attractive business location. But Arlington's real strength is the decades of planning that have produced one of the most vibrant, civically engaged communities in the world. Those plans have paved the way for this investment, and we look forward to engaging the Arlington community about Amazon's plans and how we can grow together."

Amazon's new Operations Center of Excellence in Nashville

Downtown Nashville, along the Cumberland River, is the heart of the city just north of the Gulch and is home to urban living, retail, restaurants, entertainment venues, hospitality, open green spaces, and offices. The area is served by commuter rail, more than a dozen bus routes, and is a 15-minute drive to Nashville International Airport. As part of Amazon's investment, Tennessee, Davidson County and the city of Nashville will benefit from 5,000 full-time, high-paying jobs; over $230 million in investment; 1 million square feet of energy-efficient office space; and an estimated incremental tax revenue of more than $1 billion over the next 10 years as a result of Amazon's investment and job creation. Amazon will receive performance-based direct incentives of up to $102 million based on the company creating 5,000 jobs with an average wage of over $150,000 in Nashville. This includes a cash grant for capital expenditures from the state of Tennessee of $65 million based on the company creating 5,000 jobs over the next 7 years, which is equivalent to $13,000 per job; a cash grant from the city of Nashville of up to $15 million based on $500 for each job created over the next 7 years; and a job tax credit to offset franchise and excise taxes from the state of Tennessee of $21.7 million based on $4,500 per new job over the next 7 years. "We want to thank Amazon for its continued investment in the state of Tennessee and are excited about the additional 5,000 corporate jobs they will be creating in Nashville," said Governor Bill Haslam of Tennessee. "It has never been clearer that Tennessee is a great place to do business, and we continue to attract a wide variety of global companies that provide high-paying, quality jobs for our residents."

"Amazon's decision to expand its presence in Nashville is a direct result of the talented workforce and strong community we've built here," said Mayor David Briley of Nashville. "These are quality, high-paying jobs that will boost our economy, provide our workers with new opportunities, and show the rest of the world that Nashville is a premiere location for business investment. We thank Amazon for investing in Nashville, and we look forward to welcoming them to this community."

With more than 610,000 employees worldwide, including over 250,000 in North America, Amazon ranks #1 on American Customer Satisfaction Index, #2 on Fortune's World's Most Admired Companies, #1 on The Harris Poll's Corporate Reputation survey, and #1 on LinkedIn's U.S. Top Companies, a ranking recognizing the most desirable workplaces in the country. Amazon was also recently included in the Military Times' Best for Vets list of companies committed to providing opportunities for military veterans.

All economic impact and incentive figures are best estimates calculated by relevant entities in each of the selected communities based on current information.

This story first appeared on CNBC.com. More from CNBC: