The process was conducted by a team of about a dozen people within Amazon, including economists, human resources managers and executives who oversee real estate, according to people briefed on the process who spoke on the condition of anonymity because the deliberations were private. Jeff Bezos, Amazon’s chief executive who was the mastermind behind turning the search into a public process and coined the term “HQ2,” was also involved, the people said.
The veil of secrecy kept even the finalist cities in the dark until Thursday’s announcement.
Muriel Bowser, the mayor of Washington, was on her way into the office when a deputy mayor called and said that the city had made the Top 20. “I was, of course, pleased, but not that surprised because we know that Washington, D.C., matches what Amazon is looking for,” Ms. Bowser said.
Hans Riemer, president of the Montgomery County Council, found out from a friend via text message.
“My heart skipped a beat,” he said.
The process will now shift into a new phase, with Amazon representatives communicating more directly with the finalist cities as they prepare to select a winner later this year — and perhaps with cities being even more outspoken about why they should be chosen. Emissaries from Amazon are expected to visit the finalist locations in person.
Some of the finalists are neighbors, setting up what are likely to be intense regional rivalries. Ms. Bowser said Amazon’s selection of Montgomery County and Northern Virginia — both near Washington — spoke to the appeal of the region’s work force.
“Of course,” she added, “we believe that Washington, D.C. — with our top talent and world-class amenities — is the right place for Amazon HQ2.”
Mayor Baraka said that Newark has a “friendly rivalry” with its bigger neighbor, New York, while adding that his city enjoys the advantages of cheaper real estate, space for development in its downtown and lots of fiber optic network capacity.
Amazon needs a second headquarters because it’s bursting at the seams in its hometown, Seattle. Mr. Bezos founded the company there in 1994, and it has since transformed the city, employing more than 40,000 there. That expansion has also contributed to Seattle’s soaring cost of living and its traffic woes.
To lure applicants, Amazon showered local politicians with its own data about the effect the company has had on the Seattle economy, and some of the immediate economic benefits its second home would experience — including $5 billion in construction spending.
It asked candidates to include in their bids a variety of detailed information, including potential building sites, crime and traffic stats and nearby recreational opportunities. Amazon also asked cities and states to describe the tax incentives available to offset its costs for building and operating its second headquarters. The most eye-popping of those offers was New Jersey’s promise of up to $7 billion in tax incentives to bring Amazon to Newark.
Another tech giant, Apple, this week said it, too, was hunting for a location to build a major new campus. But the company’s chief executive, Tim Cook, said it would not conduct a public bidding process akin to Amazon’s. He said California and Texas were unlikely locations for the new campus because Apple already has significant operations there.
Amazon’s search process has also attracted critics. Stacy Mitchell, co-director of the Institute for Local Self-Reliance, a nonprofit organization that serves as an advocate for local businesses, said that politicians were enhancing Amazon’s image just as the company’s market power was under growing scrutiny from groups like her own.
“As these cities woo and grovel, they are basically communicating this idea that we should want Amazon to be bigger and more powerful in our economy,” Ms. Mitchell said.
Ed Glaeser, a professor of economics at Harvard who studies cities, predicted that the winner of the contest would have in place the kind of positive economic attributes that mean it wouldn’t necessarily need Amazon to thrive.
“At its best, the competition for Amazon has spurred cities to think about how to improve their quality of life more generally,” he said. “At its worst, the competition has become a distraction and a contest for throwing cash at the giant.”