This neighborhood east of Second Street and north of King Street in San Francisco. (Adithya Sambamurthy/The Bay Citizen)

SAN DIEGO (AP) — A research firm says home prices in the San Francisco Bay Area began to cool off last month after a torrid run.

DataQuick said Friday that the median sales price for new and existing houses and condominiums in August was $540,000, down by $22,000 from the previous month, a drop of almost 4 percent. The median price was still up a whopping 32 percent from August 2012.

Due to seasonal shifts in sales patterns, the Bay Area median almost always declines from July to August.

The Bay Area median peaked at $665,000 in June/July 2007, then dropped as low as $290,000 in March 2009. Last month’s median was 18.8 percent below the peak.

Sales were sluggish in the nine-county region, especially for lower-priced homes. DataQuick says slightly more than 8,600 homes sold during the month, down nearly 1 percent from the same period last year.

Foreclosure resales – homes that had been foreclosed on in the prior 12 months – accounted for 4.6 percent of resales in August, the same as July’s revised percentage, and down from 14.5 percent a year ago. The July and August level is the lowest since 4.4 percent in August 2007. Foreclosure resales peaked at 52.0 percent in February 2009. The monthly average for foreclosure resales over the past 17 years is about 10 percent.

Short sales – transactions where the sale price fell short of what was owed on the property – made up an estimated 10 percent of Bay Area resales last month. That was down from an estimated 10.6 percent in July and down from 23.3 percent a year earlier.