It was the first time in seven months that the monthly sales total was higher than the year before.
"The up trend in home sales is consistent with improvements in the economy and jobs," said Lawrence Yun, NAR's chief economist.
The report was slightly stronger than expected. A consensus of experts surveyed by Briefing.com had expected sales to hit 5.23 million.
Yun pointed out that home sales have benefited from unusually favorable conditions: Mortgage rates are still very low; there's a large supply of homes to choose from; and home prices have fallen to near post-housing bust lows.
One factor holding buyers back is the still tight mortgage lending.
"Buyers have been constrained by unnecessarily tight credit," said Yun. "As a result, there are abnormally high levels of all-cash purchases, along with rising investor activity."
NAR reported that all-cash sales went up to 32% of the total, up from 26% a year earlier. It estimated the percentage of investor purchases hit 23%, up from 17% a year ago.
"Unprecedented levels of all-cash purchases -- primarily of distressed homes sold at deep discounts -- undoubtedly pulls the median price downward," said NAR president, Ron Phipps.
Whatever the source of the sales, they do have a welcome impact on supply. Inventory dropped 5.1% to 3.38 million units, a 7.6-month supply at the current rates of sales. That was the lowest inventory level in more than a year.
Normally, a five- or six-month supply is considered a good balance between supply and demand. That's when sellers will start to regain some of the "pricing power" they've lost in the bust.
Right now, said Hoffman, "Sellers are desperate to sell and buyers bidding low."