The median sale price for Bay area homes fell in August to $675,000. It was the second consecutive month of price declines across the nine counties since since the median hit an all-time high of $710,000 in June.

The price for all homes — single-family homes, condos, townhouses — fell 2.9 percent from $695,000 in July. On a year-over-year basis, however, the median was up 5.2 percent from $641,750 in August 2015.

“The region’s median sale price has risen on a year-over-year basis for nearly four and a half years, and while those gains were consistently double-digit — as high as 33 percent — between mid-2012 and mid-2014, they have since been single-digit and fairly steady, averaging about seven percent over the past two years,” said Andrew LePage, research analyst for the CoreLogic real estate information service, which released the latest numbers.

“In July and August, those year-over-year gains dropped to around 5 percent,” he continued in a statement. “Given seasonal and other forces, including affordability constraints, it’s possible that the Bay Area’s median sale price hit its peak for 2016 in June when it was $710,000, the region’s all-time high.”

According to CoreLogic, 8,374 homes sold in August in the region’s nine counties — up 8.3 percent from July 2016 and up 3.2 percent from August 2015. The sales uptick reversed a months-long decline in sales.

“San Francisco Bay Area home sales perked up a bit in August, rising slightly above a year earlier for the first time since March of this year,” said LePage. “Job growth, low interest rates, household formation and other factors helped drive sales.”

In Santa Clara County, the median price rose year-over-year by 2.3 percent from $811,000 to $830,000. In San Mateo County, the rise was nine percent from $975,000 to $1,062,500.

In Alameda County, the median was up 6.4 percent year-over-year, from $639,000 to $680,000. In Contra Costa County, the increase was more marginal — up 1.3 percent from $502,500 to $509,000.

Richard Scheinin covers residential real estate for the Bay Area News Group. He has written for GQ and Rolling Stone and is the author of Field of Screams: The Dark Underside of America’s National Pastime (W.W. Norton), a history of baseball. During his 25-plus years based at The Mercury News, his work has been submitted for Pulitzer Prizes for reporting on religion, classical music and jazz. He shared in the Pulitzer Prize awarded to the Mercury News staff for coverage of the Loma Prieta earthquake. He has profiled hundreds of public figures, from Ike Turner to Tony La Russa.