In Crystal City, Virginia, commuters and residents wonder how Amazon's newest headquarters will change where they work and live. (Video: Jorge Ribas/The Washington Post)

Virginia learned it had won the biggest economic development contest in U.S. history when a low-profile state official got a phone call in the parking lot of a Wendy’s restaurant in the Shenandoah Valley at 2 p.m. Monday.

The call to Stephen Moret capped 14 months of intense negotiations and ended fears that persisted until the last minute that Virginia would lose the prize, especially because of its high price for labor and real estate. At one point, Arlington economic development chief Victor Hoskins was convinced that the state didn’t have a chance because rivals such as Maryland and New Jersey were offering vastly larger subsidies and other incentives.

“The biggest question in our mind — really until the end — was how would [Amazon] weigh the availability of talent versus cost,” said Moret, chief executive of the Virginia Economic Development Partnership and the state’s top negotiator with Amazon.

Moret noted that one of Amazon’s corporate “leadership principles” is “frugality.”

Amazon HQ2 decision: Amazon splits prize between Crystal City and New York

Amazon was little help. It was stingy about sharing information, forcing the Virginians to gauge the company’s interest by the frequency of its calls and visits and the nature of its questions. Even in the Monday call, when Amazon’s top negotiator Holly Sullivan confirmed that Virginia was getting only half the original proposal of 50,000 jobs, she declined to divulge that New York City was the winner of the other half.

Instead of the blustering and promises by top state officials such as New York Gov. Andrew M. Cuomo (D) or the shiny perks others offered such as street renamings and free airport parking and museum admission, Virginia’s more straightforward bid was handled by bureaucrats such as Moret. State officials said Amazon was particularly impressed by the state’s willingness to kick in an additional $1.1 billion over 20 years to expand tech higher education.

The Virginians gradually grew more confident, beginning in the summer, as Amazon asked for increasingly detailed information about availability of office buildings and the size of government subsidies.

“They really drilled down on the real estate and on the economic development package,” Hoskins said. “That’s when we knew it was serious.”

Amazon HQ2 to benefit from more than $2.4 billion in incentives from Virginia, New York and Tennessee

A turning point occurred in late July when Amazon officials made the second of their three group visits to Northern Virginia. They wanted to visit only the Arlington site and an adjoining property at Potomac Yard in Alexandria, shunning other Northern Virginia sites they had toured during their initial visit in February. They spent all day touring about a dozen office spaces with a group of executives from JBG Smith, Crystal City’s top real estate developer.

JBG Smith CEO Matt Kelly said that before the group visited, “they said to wear comfortable shoes: ‘We want to see everything.’ ”

Despite a prolonged tug of war over incentives and transportation investments, both Virginia and Amazon said the most important advantages offered by Arlington were in place at the start of the negotiations. Those were the availability of a highly educated workforce and a diverse, citylike environment with good public transportation, likely to attract the young, upscale tech professionals who are Amazon’s most valuable resource.

“They ultimately determined that the single most important thing was the best talent in the world, and where could they get that,” Moret said.

That assessment was confirmed, albeit indirectly, in comments from some of the losers after the announcement. Dallas Mayor Michael Rawlings (D) said an Amazon official told him his city lost out largely because it didn’t have as many high-tech workers as the company needed immediately. (It wasn’t enough that Dallas offered to appeal to Amazon’s pet lovers by waiving Amazon employees’ pet adoption fees at a city animal shelter and providing free microchipping for all Amazon pets until 2022, according to the Dallas Business Journal.)

In Crystal City, news of Amazon’s arrival inspires yearnings for a facelift

Chicago Mayor Rahm Emanuel (D), whose offer included larger subsidies than those offered by Virginia, told the Chicago Tribune, “There are some things we need to continue to build on, and that is making sure that we have a tech economy that is . . . actually world class.”

Amazon declined to comment for this story, beyond what it said publicly Tuesday at the time of its announcement. A company spokesman declined to say whether chief executive and founder Jeffrey P. Bezos has visited Crystal City. Bezos owns The Washington Post.

From the beginning of Virginia’s effort, when it offered three regional bids of the 238 submitted nationwide, the state emphasized its eagerness to help Amazon attract top tech talent.

In its original proposal in October 2017, Virginia offered a higher education technology plan that ended up being a $1.1 billion commitment over 20 years to expand computer science and related fields at the state’s universities and community colleges. About a quarter of the money will go to help Virginia Tech build a $1 billion technology campus in Alexandria.

The education proposal was not formally part of the Amazon incentives package, and Amazon did not refer to it in its news releases. It apparently did not want to be accused of asking the state for such a large investment and thus give ammunition to critics of government subsidies to huge, rich corporations.

Crystal City workers, residents contemplate the benefits — and nightmares — that come with Amazon

But Gov. Ralph Northam (D) announced the technology education and Amazon incentives packages at the same time, and state officials said the former played an important role in Amazon’s decision.

“This was part of the conversation with Amazon,” Secretary of Commerce Brian Ball said. “This is something that they wanted and we wanted.”

The process really got going in January, when Amazon trimmed the list of 238 to 20 finalist jurisdictions. One was Northern Virginia, which offered four sites.

In late February, Sullivan and other Amazon officials had dinner with Moret, Hoskins and other state and local officials at the Torpedo Factory in Old Town Alexandria and spent the next day touring all of Northern Virginia’s sites.

Sullivan, who previously worked in economic development for Montgomery County, knew the region well. She and Moret also worked together when Amazon Web Services added 1,500 jobs in Herndon in early 2017.

“At that point, they had not really homed in on Crystal City,” Hoskins said. “They were asking about the community: What kind of people live in Arlington?”

Amazon’s HQ2 could be boon or bust for Metro and the region’s transportation infrastructure

Amazon also was asking about public transit and expressed concern that Virginia, Maryland and the District had not yet agreed on dedicated funding for Metro.

“Thank God, by the time they came back [in July], that had been done,” Hoskins said.

Hoskins also was unhappy when he saw that Maryland was offering incentives totaling $8.5 billion, and New Jersey was offering $7 billion.

“When I saw those numbers, I shook my head and said, ‘We can’t get there from here,’ ” Hoskins said. There was also concern that Atlanta or Chicago might win because of lower housing costs.

Virginia is historically less generous than other states in offering incentives, and in the end, the state and Arlington promised $573 million for 25,000 jobs, plus investments totaling $223 million for transportation, including upgrading two Metro stations and building a pedestrian bridge connecting Crystal City to Reagan National Airport. The subsidies and transportation investments will increase if Amazon creates more than 25,000 jobs, with the official state memorandum of understanding foreseeing that the number could rise to 37,850.

Breakthrough in Virginia on Metro funding: Lawmakers approve $154 million

Looking back, it appears that Amazon decided during the spring that Northern Virginia had the tech talent and quality-of-life features it wanted, state and local officials said. From then on, the company increasingly focused on specifics about the Crystal City-Potomac Yard site, which was a joint bid by Arlington and Alexandria.

It also appeared that other cities were falling out of the race, based on declining buzz in the media and the economic development rumor mill. Greater Boston Chamber of Commerce President Jim Rooney said officials had only “light contact” with Amazon leaders following a site visit in early spring.

In the final weeks before Tuesday’s announcement, the biggest change came in September when Amazon began talking about splitting the original investment between two cities, according to Virginia officials, whose account was confirmed by other people close to the process.

The Virginians were taken aback but remained eager to land 25,000 jobs — which would still rank as the biggest U.S. competitive economic development award ever.

“We got over the [reduction] very quickly, and all in all, I think it became a better deal,” Hoskins said. “It was less complicated at 25,000.”

The state recalculated the incentives it was offering, cutting its direct subsidies and transportation investments by half. The state did not reduce its planned spending on the higher education technology initiative, largely because it felt the state needed to make that investment anyway.

In another adjustment, the state increased the workforce grant subsidy it was promising Amazon from $20,000 to $22,000 for each new job created. It did so, Moret said, after Amazon pledged that the average pay for employees in Arlington would be at least $150,000 a year, instead of $100,000 as in the company’s original proposal.

Amazon executives visited Arlington for the third and final time in September, when they met for the first time with Arlington County Board Chair Katie Cristol, Vice Chair Christian Dorsey and County Manager Mark Schwartz.

“We were all prepared to pitch [Arlington] to them, and they ended up telling us what a great community Arlington is,” Schwartz said. “Without a lot of prodding from us, they said things that led us to believe they’d done their homework on Arlington.”

Schwartz was driving in the county’s Ballston neighborhood Monday afternoon when Hoskins called him and said, “I have some bad news.” Schwartz girded himself, but it proved needless. “He said, ‘We won! We won!’ ”

Rachel Chason, Katherine Shaver and Susan Svrluga contributed to this story.