Who would have thought that this summer, with the number of COVID-19 cases surging and new rounds of restrictions and shutdowns, would yield one of the most competitive housing markets in recent memory? Nonetheless, home prices have hit record highs as buyers are battling it out across the nation over a limited selection of reasonably priced abodes.

In July, the median home price shot up 8.5% year over year, to hit a new all-time high of $349,000, according to the most recent realtor.com® data.  And those mind-boggling high prices, shooting up in the middle of a recession with the worst unemployment since the Great Depression and an economy undergoing a historic contraction, are a direct result of the pandemic.

Buyers paid a median $27,000 more for a home in July than they did last year because the supply of available properties for sale plummeted at the same time that demand for them had skyrocketed. This happened despite the economy shrinking by 9.5% in the second quarter of the year from the previous one, as the U.S. Commerce Department reported Thursday. Gross domestic product, aka GDP, the value of goods and services produced, dropped the most in the more than 70 years that it has been recorded

When the pandemic helped tip the U.S. economy into recession, most homeowners and home buyers braced for falling house prices,” says realtor.com Chief Economist Danielle Hale. “That’s what happened in the last recession. But that’s not what we’re seeing in today’s market. We had a housing shortage already, and the pandemic has created conditions that have only worsened it.”

The total inventory of homes on the market is about a third less—roughly 440,000 properties short—than what existed last summer. In some parts of the country, new home construction was delayed or paused in the spring in the beginning of the pandemic. Meanwhile, many sellers nervous about contracting COVID-19 from buyers touring their homes put off plans to list their residences or pulled them off the market. Many of those listings have yet to go back up.

This intensified housing shortage collided with scores of buyers hoping to quarantine in larger abodes and take advantage of the lowest mortgage interest rates ever.

Buyers who were sidelined by the virus in the spring are now jockeying with those who had planned to buy in the summer. And they’re competing with those who had no plans to move until the stay-at-home orders created a burning desire for additional square footage and a big backyard in which to ride out the crisis.

Record-low mortgage rates have added fuel to the fire as homeownership is now more affordable for buyers. They dipped below 3% for the first time in the week ending July 16, according to Freddie Mac. (They have since ticked up to 3.01% in the week ending July 23.) Those shrunken rates can greatly reduce monthly mortgage payments.

The reduced rates are a consequence of the federal government’s actions and the response of investors to the turbulent economy.

“We have this market imbalance tipped pretty solidly in favor of sellers at this point,” says Hale. “Yet many homeowners believe that now is still not a good time to sell.”

This has led to a return to bidding wars and offers over asking price, which is helping to drive up home prices. And it doesn’t look like they’ll be coming down anytime soon.

Prices shot up even more in the latter half of the month, rising a median 9.1% in the weeks ending July 18 and July 25 compared with the previous year, according to realtor.com data.