Amazon

Amazon is one step closer to planting a flag for its second headquarters.

On Thursday, the world's largest online retailer announced the final 20 selections for its HQ2. Amazon whittled down the list from proposals submitted by 238 communities in the US, Canada and Mexico. The company, which is based in Seattle, plans to pick a new host city later this year.

Here are the 20 finalists for Amazon's HQ2:

Atlanta

Austin, Texas

Boston

Chicago

Columbus, Ohio

Dallas

Denver

Indianapolis

Los Angeles

Miami

Montgomery County, Maryland

Nashville, Tennessee

Newark, New Jersey

New York City

Northern Virginia

Philadelphia

Pittsburgh

Raleigh, North Carolina

Toronto

Washington, DC

The company's push to build a second home base highlights how massively Amazon has expanded during its 20-plus year history. It started as an online bookseller and now, in addition to being an internet purveyor of hundreds of millions of products, it's a cloud-computing juggernaut, an electronics maker and a Hollywood studio. The new location also shows that the company is still not done growing, even after years of heavy investing to branch out into new businesses.

Whichever city is selected could get a huge injection of new investment and jobs from the e-commerce titan, plus the notoriety of housing one of the world's leading tech companies. All those benefits are why so many cities pulled together lavish proposals to woo Amazon. For instance, Newark, NJ -- one of the 20 finalists -- is offering $7 billion in incentives. Chicago, another finalist, is offering $2 billion.

But there's also been a lot of concern that Amazon's new headquarters will push up housing costs, increase congestion and change the character of its new host city. Seattle, Amazon's original home, has also worried that the company will invest less there in future years.

Meanwhile, Apple said on Wednesday that it will be bringing back a mountain of cash it's been storing overseas and will use some of that money to build a new US campus of its own.

Now playing: Watch this: 5 tips for your new Amazon Echo

Many of the cities chosen were widely expected to make the cut, according to an October analysis from Moody's Analytics. The ratings firm had seen Austin -- home of Amazon-owned Whole Foods -- as the top pick, followed by Atlanta and Philadelphia.

"Amazon's decision to place the Newark on its short list of 20 municipalities to host is new headquarters is by itself a great victory for our city," Newark Mayor Ras J. Baraka said in a statement Thursday.

Detroit Mayor Mike Duggan, whose city didn't make the list, said he was nonetheless proud of his city's proposal to Amazon.

"I expect the lessons we learned in the Amazon process will help make us more successful on a number of other major potential investments that we are currently pursuing," he said in a statement.

Amazon began its search for a "second home" in early September and stopped accepting proposals on Oct. 19. The company said HQ2 will be equal to its Seattle headquarters -- and not a satellite location -- and that Amazon expects to spend more than $5 billion on the project. The company estimates HQ2 will add as many as 50,000 high-paying jobs over the next 15 to 17 years.

To land HQ2, candidates made some extreme gestures. Tucson, Arizona, sent a 21-foot saguaro cactus to the tech giant. New York lit several landmark buildings in "Amazon orange." And the city of Stonecrest, Georgia, offered to rename a part of itself Amazon, Georgia.

In the announcement Thursday, Amazon said it "will work with each of the candidate locations to dive deeper into their proposals, request additional information and evaluate the feasibility of a future partnership that can accommodate the company's hiring plans as well as benefit its employees and the local community."

First published Jan. 18, 6:36 a.m. PT

Update, 10:17 a.m.: Adds more detail throughout.

CES 2018: CNET's complete coverage of tech's biggest show.

The Smartest Stuff: Innovators are thinking up new ways to make you, and the things around you, smarter.