The median home price topped $350,000 for the first time in May as a shortage of properties and low interest rates drove double-digit monthly increases this spring.

The sharp increase in existing-home prices kept more buyers on the sidelines, contributing to the fourth straight month of declining sales of previously owned homes, the National Association of Realtors said Tuesday. Existing-home sales fell 0.9% in May from April to a seasonally adjusted annual rate of 5.8 million. May sales rose 44.6% from a year earlier, when home sales dropped due to Covid-related lockdowns.

The median existing-home price rose 23.6% in May from a year earlier to $350,300, a record high, NAR said. The annual price appreciation was the strongest in data going back to 1999. Median sales prices have climbed sharply since rising above $300,000 for the first time last July.

Economists surveyed by The Wall Street Journal expected a 2.1% monthly decline in sales of previously owned homes, which make up most of the housing market.

The housing market remains extremely hot, with house prices rising quickly and many homes getting multiple offers. Low mortgage-interest rates have spurred robust demand. More than half of homes sold above their list price in May, according to real-estate brokerage Redfin Corp.

SHARE YOUR THOUGHTS

Have you bought a home during the pandemic? Share your experience. Join the conversation below.

The number of home sales is limited because there aren’t enough homes on the market to meet demand, say economists and real-estate agents. Buyers are also beginning to balk at higher prices.

“Affordability appears to be now squeezing away some buyers,” said Lawrence Yun, NAR’s chief economist. “There are so many people who have been outbid, frustrated they are unable to buy.”

Homes are selling quickly. The typical home that sold in May spent 17 days on the market, matching the record low reached in April, NAR said.

Buyers with limited cash for down payments are struggling the most to compete. Half of existing-home buyers in April who used mortgages put at least 20% down, according to a NAR survey.

Jake and Belén Markham, who live in Gilbert, Ariz., put in two unsuccessful offers on houses this spring before deciding to find a rental apartment instead.

“We started realizing that…we couldn’t get what we wanted, pretty much, with the prices how they were,” Mr. Markham said. “Our best bet is to keep saving up money, so that we can be a little bit more of a player in this market.”

There were 1.23 million homes for sale at the end of May, up 7% from April and down 20.6% from May 2020. At the current sales pace, there was a 2.5-month supply of homes on the market at the end of May.

Mortgage applications for home purchases have slowed this spring as supply remained low and prices continued to rise. Applications fell 17% from a year earlier in the week ended June 11, according to the Mortgage Bankers Association.

Just 35% of consumers surveyed by Fannie Mae in May said it was a good time to buy a home, a record low in data going back to mid-2010.

“From our perspective, it’s almost all driven by the attitudes about price,” said Doug Duncan, chief economist for Fannie Mae.

Jennifer Rubin and Matthew Snyder lost out on 11 offers before having one accepted for a four-bedroom house in Shoreline, Wash. The couple was living in a one-bedroom apartment with their 3-year-old daughter and in a rush to buy a house, because their second child is due in August.

“We were competing with people that were willing to put $250,000 on top of the asking price,” Ms. Rubin said. “It was really stressful and emotionally draining to constantly be rejected from offer after offer.”

Jennifer Rubin and Matthew Snyder lost out on 11 offers before having one accepted for a four-bedroom house in Shoreline, Wash.

Jennifer Rubin and Matthew Snyder lost out on 11 offers before having one accepted for a four-bedroom house in Shoreline, Wash.

Photo: Roy Vincent

The family moved into their new home last month. “I feel really fortunate to be able to afford to buy a home. I honestly didn’t think that it was in our future,” Ms. Rubin said. “We did save as much as we could when we could, but still it never felt like enough.”

Existing-home sales fell the most month-over-month in the West, down 4.1%, and in the Northeast, down 1.4%. Sales rose 1.6% in the Midwest.

Sales were especially strong at the high end of the market, with the number of homes selling that were priced over $1 million more than doubling in May compared with a year earlier, according to NAR.

Building activity has increased in the past year, but home builders are limited by land supply and material costs.

Housing starts, a measure of U.S. home-building, rose 3.6% in May from April, the Commerce Department said last week. Residential permits, which can be a bellwether for future home construction, fell 3%.

News Corp, owner of The Wall Street Journal, also operates Realtor.com under license from the National Association of Realtors.

As rental-home investors around the U.S. snap up single-family houses, some investors are buying homes through sale-leaseback transactions, which offer struggling homeowners a way to pay off debt while staying in their home. But many experts worry they may never be homeowners again. The Wall Street Journal Interactive Edition

Write to Nicole Friedman at nicole.friedman@wsj.com