WASHINGTON (AP) — Sales of previously occupied U.S. homes slowed again in July as record prices and the highest mortgage rates in a year prove to be an insurmountable hurdle for many prospective homebuyers.

Existing home sales fell 1.7% last month from June to a seasonally adjusted annual rate of 4.06 million units, the National Association of Realtors said Tuesday. That's slightly above the 4.05 million pace economists were expecting, according to FactSet.

July sales, however, were up 0.7% compared with last year.

Home prices continued to rise, hitting unprecedented levels for the month of July, NAR said. The U.S. median sales price increased 2% from a year earlier, to $434,100.

READ MORE: U.S. home prices hit an all-time high as sales slow and mortgage rates rise