Record high home prices are taking their toll even on a market that is used to pricey properties. June sales of both newly built and existing homes in the San Francisco Bay Area dropped just more than 9 percent compared with a year ago, according to CoreLogic.

The survey covers both single-family homes and condominiums in Alameda, Contra Costa, Marin, Napa, Santa Clara, San Francisco, San Mateo, Solano and Sonoma counties.

“Last month’s home sales were the lowest for June in four years, and the year-over-year drop in the total number of transactions was the largest in 14 months,” said Andrew LePage, a CoreLogic analyst. “A portion of last month’s year-over-year sales decline reflects one less business day for recording deals this June. But affordability and inventory constraints are likely the main culprits in last month’s sales slowdown.”

The median price of a Bay Area home sold in June hit $875,000, up 12.9 percent compared with June 2017. That is the highest price on record. Annual price gains over the last six months were twice what they were a year ago, reflecting high demand and low supply of homes for sale.

“Price growth is only part of the problem that home shoppers have faced,” LePage said. “The median price paid for a Bay Area home this June was up almost 13 percent year over year, but the principal-and-interest mortgage payment on that median-priced home was up about 22 percent because of the rise in mortgage rates – more than half a percentage point – over the past year.”