Even before Amazon.com completes its northern Virginia office hub, the e-commerce giant has helped make the area the most competitive housing market in the U.S.

It’s hardest for buyers to win a home in Alexandria and Arlington, cities near Washington’s Reagan National Airport and close to where Amazon is building its East Coast headquarters, according to a study by Redfin. The brokerage’s analysis factored in bidding wars, waived contingencies, above-list-price offers and how fast properties went under contract.

Homes that sold last month were on the market for a median 11 days in Arlington and 14 days in Alexandria, about a week less than in the previous July for both locations. That compares with 27 days in the Washington, D.C., metropolitan area and 38 days nationally. About 57% of homes near Amazon’s northern Virginia site were snapped up by buyers in two weeks or less.

In Seattle, where Amazon is based, locals blamed the company’s rapid growth and big paychecks for helping to fuel a housing affordability crisis. In the area around the nation’s capital, investors are bidding up prices, anticipating that they’ll be rewarded over the next decade with the arrival of tens of thousands of workers earning an average of $150,000 each.

“The Amazon HQ2 effect has become a permanent factor in the Arlington and Alexandria housing markets,” local Redfin listing agent Marcia Burgos-Stone said in the report. “Some sellers are still opting to hold on to their homes and wait until it becomes a more concrete reality in the hopes that they’ll get more money. This has led to a shortage of homes for sale, which puts pressure on buyers who are concerned that they’ll be left behind if they can’t find a home before things get too heated up.”

In both Arlington and Alexandria, the number of homes for sale fell by about 50% in July from a year earlier, Redfin said.

The brokerage’s analysis assessed a “compete score” on a scale of 0 to 100. In markets that score above 90, most listings get multiple offers, and contingencies — such as appraisals or inspections — are often waived. Arlington and Alexandria each scored 96, along with Grand Rapids, Michigan, a city with a strong economy, growing job market and relatively affordable prices, Redfin said. Following were Tacoma, with 95, and Oakland, California, with 93.