SAN FRANCISCO/WASHINGTON (Reuters) - Amazon.com Inc AMZN.O picked America's financial and political capitals for massive new offices on Tuesday, branching out from its home base in Seattle with plans to create more than 25,000 jobs in both New York City and an area just outside Washington, D.C.

The world’s largest online retailer plans to spend $5 billion on the two new developments in Long Island City and Arlington, Virginia, and expects to get more than $2 billion in tax credits and incentives with plans to apply for more.

The prize, which Amazon called HQ2, attracted hundreds of proposals from across North America in a year-long bidding war that garnered widespread publicity for the company. Amazon ended the frenzy by dividing the spoils between the two most powerful East Coast U.S. cities and offering a consolation prize of a 5,000-person center in Nashville, Tennessee, focused on technology and management for retail operations.

Losers said they learned from the process, while winners said it was costly but worthwhile.

“Either you are creating jobs or you are losing jobs,” New York Governor Andrew Cuomo told a news conference on Tuesday.

With more than 610,000 workers worldwide, Amazon is already one of the biggest employers in the United States and the world's third-most valuable company, behind Apple Inc AAPL.O and Microsoft Corp MSFT.O.

Still, it faces fierce competition for talent from Alphabet Inc's GOOGL.O Google and other companies working to build new technologies in the cloud. Those rivals routinely offer free food and perks in sunny California, seen by many as a better draw than Amazon's relative frugality in rain-plagued Seattle. Google also has a growing footprint in New York City.

Already marketing its forthcoming location in the New York City borough of Queens, Amazon talked up Long Island City’s breweries, waterfront parks and easy transit access. Rents there are typically lower than in Midtown Manhattan, which is just across the East River. The former industrial area also has a clock counting down the hours until the end of U.S. President Donald Trump’s first term in office.

The choice of Arlington, Virginia, just across the Potomac River from downtown Washington D.C., could hand Amazon greater political influence in the U.S. capital, where it has one of the largest lobbying shops in town. Locating close to the Pentagon may also help Amazon win a $10 billion cloud-computing contract from the U.S. Department of Defense, said Michael Pachter, an analyst at Wedbush Securities.

Jeff Bezos, Amazon’s chief executive and the world’s richest person, privately owns the Washington Post, which has written critical articles about Trump. In turn, Bezos’s companies have been a frequent target of broadsides from the president. The newspaper maintains full editorial independence from its owner.

Amazon’s choice largely bypassed the middle of the United States, where many cities had hoped for an economic boost and bid for the new jobs. The company already had large corporate workforces in greater Washington and New York.

“My heart is broken today,” Dallas Mayor Mike Rawlings said.

TAX BREAKS

At the outset of its search last year, Amazon said it was looking for a business-friendly environment. The company said it will receive performance-based incentives of $1.525 billion from the state of New York, including an average $48,000 for each job it creates.

It can also apply for other tax incentives, such as New York City’s Relocation and Employment Assistance Program that offers tax breaks potentially worth $900 million over 12 years. What benefit the company would actually get was unclear.

In Virginia, Amazon will receive performance-based incentives of $573 million, including an average $22,000 for each job it creates.

These rewards come on top of $1.6 billion in subsidies Amazon has received across the United States since 2000, according to a database from the Washington-based watchdog Good Jobs First.

Slideshow ( 11 images )

Amazon says it has invested $160 billion in the country since 2010 and that the new offices will generate more than $14 billion in extra tax revenue for New York, Virginia and Tennessee over the next two decades.

It expects an average wage of more than $150,000 for employees in each new office.

HOUSING CRISIS

Amazon’s emphasis on new, high-paying jobs earned publicity as it faced criticism for low wages in its sprawling warehouses.

Slideshow ( 11 images )

The company got $148 million worth of media attention across the English-language press in the two months following the launch of its search last September, according to media measurement and analytics firm mediaQuant Inc.

Amazon received 238 proposals and New York and Virginia beat out 18 other finalists from a January short list, which included Los Angeles and Chicago.

New Jersey made headlines early in the contest by proposing $7 billion in potential credits against state and city taxes if Amazon located in Newark and stuck to hiring commitments.

Others with less money to offer took a more creative approach: the mayor of the Atlanta suburb of Stonecrest, Jason Lary, said he would create a new city from industrial land called Amazon and name Bezos its mayor for life.

In evaluating its options, Amazon looked at the quality of schools, meeting with superintendents to discuss education in science and math. Amazon also wanted helicopter landing pads for the new sites, documents it released on Tuesday show.

The company has already had to navigate community issues at its more than 45,000-person urban campus in Seattle. An affordable housing crisis there prompted the city council to adopt a head tax on businesses in May, which Amazon helped overturn in a subsequent city council vote.

Some critics had pushed for more transparency from cities and states in the bidding process, warning that the benefits of hosting a massive Amazon office may not offset the taxpayer-funded incentives and other costs.

“Our subways are crumbling, our children lack school seats, and too many of our neighbors lack adequate health care,” New York State Senator Michael Gianaris and City Council Member Jimmy Van Bramer said in a joint statement. “It is unfathomable that we would sign a $3 billion check to Amazon in the face of these challenges.”

Amazon shares closed down 0.3 percent at $1631.17, giving the company a market value of almost $800 billion.