New York (CNN Business) After running a year-long competition that drew interest from hundreds of cities and a number of states, Amazon has chosen New York City and Northern Virginia to split duty as its second headquarters.

On Tuesday, Amazon announced it has chosen New York's Long Island City and Virginia's Arlington for HQ2. Both locations will receive a $2.5 billion investment from Amazon, and each will have more than 25,000 workers over time. Hiring begins next year.

The reason behind the surprise decision to divide the facility was due to the talent pool. Amazon realized it could recruit more skilled workers and offer employees choice if it offered two locations.

The development projects promise to bring the cities a giant infusion of high-paying jobs and tax revenue, but are almost certain to draw fire from critics concerned about their impact on infrastructure and property values.

Amazon said it in a blog post it will receive incentives of about $1.5 billion based on job creation in Long Island City, and incentives of $573 million for Arlington. Jobs in both cities will have an average annual salary of $150,000, the company said.

In Long Island City and Arlington, Amazon will have four million square feet of office space with the possibility of expanding to 8 million square feet. Amazon estimates an incremental tax revenue of over $10 billion in the next 20 years as a result of its investment and job creation in Long Island City and New York, and $3.2 billion over the same time period in Arlington and Virginia.

Jay Carney, SVP of Worldwide Corporate Affairs at Amazon, said the process of cities offering incentives to companies looking to enter new regions is standard across the US.

"If you look at some of the packages that were put forward by other cities, the incentives ... in New York and the DC area, Northern Virginia are actually lower than were offered elsewhere," he told CNN's Julia Chatterley. "The talent was really the driving factor for us."

Carney said it was important for Amazon to be in spots that would be attractive to potential new employees.

The Arlington headquarters will be located in what Amazon is calling "National Landing," which is less than 3 miles from downtown Washington DC. The newly-branded neighborhood includes parts of Pentagon City and Crystal City in Arlington and Potomac Yard in Alexandria.

Meanwhile, the New York City office will be in the fast-growing Queens neighborhood of Long Island City , just across the East River and minutes from downtown Manhattan on the subway.

The company also announced a new hub in Nashville to oversee customer fulfillment, transportation and supply chain activities. It will employ 5,000 people. Nashville was on Amazon's short list for HQ2.

The second headquarters search began in September 2017 when Seattle-based Amazon announced it would start accepting proposals for what quickly became known as HQ2.

During the process, Amazon narrowed 238 bids to 20 finalists , including Chicago, Denver, Indianapolis, and Miami. Executives traveled across the United States -- and to one Canadian city -- to tour sites to find the company's next home.

Amazon's criteria for HQ2 included proximity to a major airport, ability to attract technical talent and a suburban or urban area with over 1 million people.

In a surprise twist, Amazon ultimately decided to choose two winners instead of one. It originally said HQ2 would create 50,000 high-paying jobs and would be a full equal to its Seattle headquarters.

One of the main concerns about the process was how a city would navigate an influx of 50,000 new workers. Splitting the project in half could ease the impact, and help Amazon avoid some of the blame for higher housing prices or more traffic in those regions. The move also allows Amazon to recruit top talent from two major Metropolitan areas.

The search ignited a frenzy among cities looking to boost their economies. Some cities responded with elaborate gestures to try to woo Amazon. Tucson, Arizona, famously sent Amazon CEO Jeff Bezos a giant cactus, and Birmingham, Alabama, installed massive Amazon delivery boxes around the city. Kansas City's mayor gave five-star reviews to 1,000 random items on Amazon's website, and Stonecrest, Georgia offered to rename some of its land the city of Amazon.

Amazon has said employees who work in Seattle will have a chance to relocate. It will also hire teams and executives for the new locations.

The company estimates that its investments in Seattle from 2010 to 2016 added $38 billion to the city's economy. These investments include buildings, parks and infrastructure, such as corporate offices and Prime Now delivery sites.

But Amazon's search for HQ2 was never just about finding a new home.

Throughout the process, Amazon skillfully obtained free data from cities across North America, including proprietary information about real estate sites under development, details about their talent pool, local labor cost and what incentives cities and states were willing to pony up to bring the company to town.

"Amazon was not going through this exercise to pick a single HQ2," said Richard Florida, a leading urbanist and professor at the University of Toronto. "It was part of a broader effort -- a corporate relocation strategy -- to crowd source a wide variety of data."