The Massachusetts housing market grew stronger last month, with nearly 5,000 single-family homes sold, a 27 percent increase over July 2011 and the biggest total for the month since the market’s peak seven years ago.
The robust numbers — released Wednesday by Warren Group, a Boston company that tracks real estate transactions — were spurred by increased confidence that real estate is rebounding and continued low interest rates.
Condominium sales also rose sharply to 1,994, a 34 percent increase compared with July 2011, Warren Group said.
It was the latest in a series of reports showing that the local and US housing markets are finally gaining momentum after years of malaise. The S&P/Case-Shiller Home Price Indices said this week that home values increased by 1.2 percent nationwide during the second quarter, compared with the same period last year. In the Boston region, values rose by 2.5 percent between May and June, marking the third consecutive month of increases. Case-Shiller analyzes repeat sales and is considered by industry specialists to be one of the best measures of home prices.
“There are a lot of good signs pointing toward a real estate recovery,” said Cory S. Hopkins, editorial director of Warren Group.
The company also reported that the median home price statewide increased by less than 1 percent last month to $318,000, compared with the same time in 2011. That means half of the homes sold cost more than $318,000 and half sold for less.
Condominium prices dipped by 0.3 percent to $295,000, compared with July 2011.
In the Boston area — defined roughly as within the Route 128 loop — single-family home prices did even better, according to the Greater Boston Association of Realtors. The median selling price jumped 2.2 percent over the last year, to $510,000. Home values in the region are now only 5.4 percent below the all-time high of $539,000 set in August 2005, the trade group said.
The median condominium price in the Boston area gained more — rising 6.4 percent between July 2011 and last month to $387,250, the association said.
“The market is turning around and coming back,” said Bill Dermody, president of the association and branch manager at Coldwell Banker Residential Brokerage in Needham.
Dermody said the market has been more robust this summer, even though there are not enough homes for sale in the Boston area, prompting heated competition among buyers in some cases. Dermody said he expects for-sale inventory to start increasing next week, the traditional start of the fall housing market.
“Just in my office, I know of seven listings coming on the first of September,” he said.
Housing inventory is also down statewide. The Massachusetts Association of Realtors, which released its own data Wednesday, reported that the number of single-family homes for sale fell by 19.6 percent in July compared with the same month a year ago. That was the largest drop in inventory statewide since 2007.
The number of condominiums on the market dropped by 29 percent in July compared with last year.
With fewer homes available and more prospective buyers, it is taking slightly less time to sell properties, according to the realtors association. Single-family homes took an average of 98 days to sell in July, down from 99 during July 2011. Condominiums remained on the market for an average of 93 days, compared with 100 last July.
Trisha McCarthy, association president and a broker at Keller Williams Realty in Newburyport, said she anticipates home prices will keep rising, especially if inventory remains tight.
“What is needed are more sellers at all levels to ensure that price increases happen at a more reasonable place than during the [real estate] bubble years,’’ McCarthy said.Jenifer B. McKim can be reached at firstname.lastname@example.org. Follow her on twitter @jbmckim.