Even Middlesex county, which has been on a price roll for years now, also saw its median price slip, albeit by a modest 1 percent, to $433,000.

Red hot home prices across Massachusetts are cooling a bit as we head into the spring market in some good news for stressed out buyers.

Sales are surging as we head into spring, with the 6,294 homes that changed hands across the state in the first two months of 2016 representing a 27 percent increase over last year, reports The Warren Group, publisher of Banker & Tradesman.

But the median price of a home in Massachusetts fell nearly 5 percent in February, pushing it to just below the $300,000 mark from $312,500 last year.

Condo sales and prices followed the same pattern. While condo sales rose 26 percent during the year’s first two months, the median price fell 3.2 percent in the same period to $285,000.

“With a mild winter behind us and the spring market beginning to heat up, the year is off to a very strong start,” said Timothy M. Warren Jr., CEO of The Warren Group, in a statement. “Though fairly moderate, the drops in median sale prices for both single-family homes and condos bring welcome relief as the state struggles with high housing costs.”

The biggest drop in home prices came on the Cape, with Barnstable County recording a 10 percent decline in its median price, to $315,000.

On the South Shore, the median price in Plymouth County fell 3 percent, to $285,000. Condo prices fell 9 percent, to $225,000, according to The Warren Group.

Surprisingly, Middlesex County, which includes the wealthy western suburbs and which has been on a price roll for years now, also saw its median price slip, albeit by a modest 1 percent, to $433,000.

Home prices have been on fire in Essex County, which includes the North Shore, Cape Ann and the Merrimack Valley. But that upward momentum also appears to be slowing, with prices flat during the first two months of the year, at $350,000, Warren Group stats show.

However, Boston and the handful of surrounding communities in Suffolk County such as Winthrop and Revere so far are bucking the cooling trend, with the median price of a home in the county jumping 5 percent, to $420,000.