Compared with May 2012, sales were up 29 percent.
Home sales data will be closely watched in the coming months for signs of strain from the rise in mortgage rates.
The housing market recovery, which is helping to soften the blow on the economy from tight fiscal policy, has been largely driven by record-low mortgage rates, thanks to the Federal Reserve's generous monetary stimulus.
(Read More: Home Prices See Record Gain in April)
The Fed last week said it expected to start slowing the pace of its bond-buying program later this year, bringing it to a halt around the middle of 2014. That has pushed up mortgage rates, which had already been rising since early May.
Economists do not believe the increase in mortgage rates is sufficient to undo the housing market recovery. Data last week showed confidence among home builders spiked to a seven-year high in June and they were upbeat about sales over the next six months and prospective buyer traffic.
Last month, the inventory of new homes on the market increased 2.5 percent to 161,000—the highest since August 2011—as builders ramp up production to meet the growing demand.
Still, supply remains tight, putting upward pressure on prices. The median new home price increased 10.3 percent from a year ago.
At May's sales pace it would take 4.1 months to clear the houses on the market, up from 4.0 months in April. A supply of 6.0 months is normally considered as a healthy balance between supply and demand.
Sales last month were up in the Northeast, Midwest and West. They fell in the South. Sales in the Midwest were the highest since November 2007.