U.S. home sales unexpectedly fell in May as an acute shortage of properties on the market pushed house prices to a record high.

The National Association of Realtors said on Wednesday that existing home sales slipped 0.4 percent to a seasonally adjusted annual rate of 5.43 million units last month. It was the second straight monthly decline in sales.

April's sales pace was revised down to 5.45 million units from the previously reported 5.46 million units.

Economists polled by Reuters had forecast existing home sales rising 1.5 percent to a rate of 5.52 million units in May. Sales rose in the Northeast, which accounts for a small fraction of the market. They fell in the West, South and Midwest.

Existing home sales, which make up about 90 percent of U.S. home sales, dropped 3.0 percent on a year-on-year basis in May. They have declined on that basis for three straight months.

Home sales have largely treaded water this year as strong demand depletes the supply of properties on the market, causing house prices to rise faster than wages.

Supply has been especially tight at the lower end of the market, which accounts for a large portion of the housing market. With mortgage rates rising back to seven-year highs, purchasing a home could become even more expensive for first-time buyers. Housing demand is being driven by the lowest unemployment rate in 18 years.

The 30-year fixed mortgage rate rose eight basis points to an average of 4.62 percent last week, according to mortgage finance agency Freddie Mac. Mortgage rates are likely to rise further after the Federal Reserve increased interest rates last week for a second time this year and forecast two more rate hikes before the end of 2018.

There were 1.85 million previously-owned homes on the market in May. While that was up 2.8 percent from April, housing inventory was down 6.1 percent from a year ago. Supply has declined for 36 straight months on a year-on-year basis.

At May's sales pace, it would take 4.1 months to exhaust the current inventory, up from 4.0 months in April. A six-to-seven-month supply is viewed as a healthy balance between supply and demand. The median house price increased 4.9 percent from a year ago to an all-time high of $264,800 in May. That was the 75th consecutive month of year-on-year price gains.

U.S. financial markets were little moved by the data. U.S. Treasury yields rose after Fed Chairman Jerome Powell said the U.S. central bank should continue with a gradual pace of rate increases.

Stocks on Wall Street were trading mostly higher while the dollar was almost flat against a basket of currencies.

Supply likely to improve

Builders have struggled to plug the inventory gap, citing higher prices for lumber as well shortages of land and labor. The NAR is, however, optimistic the inventory situation will improve later this year.

The Commerce Department reported on Tuesday that housing starts increased 5.0 percent to a rate of 1.350 million units in May. Housing completions increased 1.9 percent to a rate of 1.291 million units last month.

Still, both starts and completions remain below the range of 1.5 million to 1.6 million units that realtors and economists said is needed to ease the supply squeeze.

According to the NAR, sales of homes priced below $100,000 plunged about 18 percent in May from a year ago. Houses for sale typically stayed on the market for 26 days in May, matching April's seven-year low and slightly down from 27 days a year ago. Fifty-eight percent of homes sold in May were on the market for less than a month.

First-time buyers accounted for 31 percent of transactions in May, down from 33 percent in both April and May 2017. Economists and realtors say a 40 percent share of first-time buyers is needed for a robust housing market.