Americans purchased new single-family homes at a seasonally adjusted annual rate of 944,000 last month, the highest level since March, the Commerce Department said Tuesday.
The 14.7 percent increase was the largest since a 16.4 percent jump in April 1993. Many analysts were expecting a much smaller increase of around 1 percent.
In June, new-home sales fell 7.1 percent, according to revised figures, a considerably bigger drop than the 3.7 percent decline reported one month ago.
The Federal Reserve has boosted interest rates six times in the last 14 months to slow the economy and keep inflation under control. The Fed's rate increases are designed to raise borrowing costs, cooling demand for big-ticket items such as homes and cars.
In mid-May, the average rate on a 30-year fixed-rate mortgage hit a five-year peak of 8.64 percent. In July, the average rate on a 30-year mortgage dropped to 8.15 percent, still higher than the 7.63 percent a year earlier. Rates now are hovering below 8 percent.
Economists say that even with the rise in mortgage rates people are in a position to buy because jobs are plentiful, incomes are rising, inflation is low and the stock market is strong.
The increase in home sales in July pushed prices up as well.
The median sales price, the point at which half the homes sold for more and half for less, rose 3.8 percent to $166,100 in July, the highest since November 1999 and up from $160,000 in June.
The average price of a new home sold in July was $196,700, up 0.5 percent from a June average of $195,800.
Sales were up in all parts of the country except for the Northeast, where they fell.
In the Midwest, sales rose 23.9 percent to an annual rate of 192,000. Sales in the West rose 22.9 percent to a rate of 258,000, and in the South they went up by 11.3 percent to a rate of 432,000. But in the Northeast, they declined by 11.4 percent to a rate of 62,000.
The supply of unsold homes fell to 3.8 months in July, meaning it would take that long to exhaust the stock of unsold homes at the July sales pace. That was the lowest level since December 1998, when the supply of unsold homes also stood at 3.8 months.
Last week, the National Association of Realtors reported that sales of previously occupied homes fell 9.8 percent in July, to a seasonally adjusted rate of 4.79 million, the lowest level since February.
Economists attributed the decrease to the big spike in mortgage rates in May. They said it often takes one or two months for a rate increase to affect sales.