SAN DIEGO — A research firm says home prices in the San Francisco Bay Area approached four-year highs last month as buyers snapped up more expensive properties.

DataQuick said Wednesday that the median price for new and existing houses and condominiums in the nine-county region reached $421,000 in July, up nearly 13 percent from the same period last year. It is the highest median price since August 2008.

Sales rose 23 percent from last year to nearly 8,500 homes.

The San Diego-based research firm says homes costing at least a half-million dollars made up a bigger part of the San Francisco Bay area's sales mix, lifting the median price. Foreclosed properties, which tend to a sell at steep discount, were a smaller part of the sales mix.