Amazon has picked New York City and Arlington, Virginia as the locations for its new headquarters, ending a much-hyped selection process that saw cities across the US offer an array of incentives in attempts to woo the technology firm.

Amazon said on Tuesday it would invest $5bn (£3.8bn) across the two sites and create 25,000 new jobs in each. It also announced a new centre of excellence for its logistics and supply chain business in Nashville where it will take on 5,000 additional staff.

The New York base will be in the Long Island City neighborhood of Queens, while its Virginia offices will be in a part of Arlington that Amazon is calling National Landing, close to Reagan International Airport and the Pentagon.

Jeff Bezos, Amazon’s founder and chief executive, owns a home and a newspaper – The Washington Post - just over the Potomac river from the new Arlington base.

Amazon said it will receive incentives of about $1.5bn based on job creation targets in Long Island City, and $573m in Arlington.

It came after a long “beauty pageant” process that saw Amazon receive 238 proposals from locations across North America seeking to secure the tech giant’s investment.

“These two locations will allow us to attract world-class talent that will help us to continue inventing for customers for years to come,” Mr Bezos said in a statement.

The company, which now employs more than 600,000 people worldwide, said salaries at its two new bases would average more than $150,000 with hiring set to start next year.

Amazon’s investments are also likely to spur the creation of tens of thousands of additional jobs in the surrounding areas.

Seattle will remain the company's main base. It was founded there as an online bookstore in 1995 and opened a $4bn building complete with indoor tropical forest there in January this year.

New York Governor Andrew Cuomo hailed Long Island City's victory in the tender process for “one of the largest, most competitive economic development investments in US history”.

“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,” he said.

Support free-thinking journalism and attend Independent events

Mayor Bill de Blasio added: “This is a giant step on our path to building an economy in New York City that leaves no one behind.

“New Yorkers will get tens of thousands of new, good-paying jobs, and Amazon will get the best talent anywhere in the world.