A home for sale sits behind a sign that reads, “sale pending,” in San Diego.

WASHINGTON — U.S. sales of previously occupied homes surged in July to a seasonally adjusted annual rate of 5.39 million, approaching a healthy level for the first time since November 2009. The spike in sales shows housing remains a driving force for the economy even as mortgage rates rise.

The National Association of Realtors said Wednesday that sales jumped 6.5 percent last month from a 5.06 million pace in June. They have risen 17.2 percent over the past 12 months ago.

Sales have now stayed above an annual pace of 5 million for three straight months. The last time that happened was in 2007. And sales are well above the 3.45 million pace hit in July 2010, the low point after the housing bubble burst.

Home sales jumped in July despite higher mortgage rates, which have risen a full percentage point since early May. Higher rates may have encouraged some potential homebuyers to close deals early.

The July report captures completed sales, which tend to reflect mortgage rates that were locked in one or two months earlier. So the impact of higher mortgage rates on the market may not be clear until the August report.

And sales could slow later this year, especially if the Federal Reserve scales back its bond purchases. The bond purchases have kept long-term interest rates, including mortgage rates, low.

For now, the average rate on the 30-year fixed mortgage remains low by historical standards. It was just 4.4 percent last week.

“All in, the one-percentage-point jump in mortgage rates in the past year doesn’t seem to have slowed home sales, as affordability remains attractive in most regions,” said Sal Guatieri, senior economist at BMO Capital Markets. “The jump in rates might have pulled forward some purchases, so a few more months of data are likely needed to wave the all clear flag.”

Steady hiring and low mortgage rates have helped the housing market recover over the last year. Banks are also slowly easing tight credit standards, which have made it hard for many people to get mortgages.

The number of available homes is also rising slowly and should support more sales. The supply of unsold homes rose 5.6 percent in July to 2.28 million. That’s still 5 percent below last year’s figure. A limited supply has pushed up prices nationwide.

There were other positive signals in the report. The proportion of distressed sales including foreclosures stayed at 15 percent, the lowest since the Realtors began tracking the figure in October 2008.

And investors made up just 16 percent of purchases, down from a recent peak of 22 percent in February. The smaller proportion of investors suggests the market is slowly returning to normal.

One troubling sign: First-time homebuyers aren’t returning to the market. They usually help drive rebounds in home sales. But they made up only 29 percent of sales in July, below the 40 percent level consistent with a healthy market.

A brighter housing market helps the broader economy. Rising home sales boosts spending at furniture and home supply stores and lifts realtors’ incomes.

Higher home values also make consumers feel wealthier, which lifts their confidence and encourages more spending. Consumer spending drives roughly 70 percent of economic activity.