U.S. home sales fell for a fourth straight month in July as a shortage of properties on the market pushed up house prices, likely sidelining some potential buyers.

The National Association of Realtors said on Wednesday existing home sales fell 0.7 percent to a seasonally adjusted annual rate of 5.34 million units last month. July's drop marked the longest streak of monthly declines since 2013.

Economists polled by Reuters had forecast existing home sales would gain 0.6 percent to a rate of 5.40 million units in July. Sales fell across the Northeast, South and Midwest, but rose in the West.

Existing home sales, which make up about 90 percent of U.S. home sales, fell 1.5 percent from a year ago in July. Sales have been stymied by an acute shortages of homes on the market for several months, although the NAR said inventory showed signs of stabilizing last month.

There were 1.92 million homes on the market in July, unchanged from a year earlier. It was the first month in three years in which inventory did not fall on a year-on-year basis, said Lawrence Yun, the NAR's chief economist.

Rising building materials costs as well as shortages of land and labor have left builders unable to bridge the inventory gap, pushing up house prices. Supply constraints have largely accounted for the sluggish housing market, but there are growing concerns that the higher house prices together with rising mortgage rates will slow demand.

At July's sales pace, it would take 4.3 months to exhaust the current inventory. A supply of six to seven months is viewed as a healthy balance between supply and demand.

The median house price increased 4.5 percent from a year ago to $269,600 in July.