WASHINGTON--A broad measure of U.S. home sales climbed for the third consecutive month in June, a sign the housing market is gaining steam after a months-long slump.

Sales of existing homes rose 2.6% to a seasonally adjusted annual rate of 5.04 million in June, the National Association of Realtors said Tuesday. That was the highest level since October.

Revisions showed May sales reached 4.91 million, up from an initially reported 4.89 million.

Economists surveyed by The Wall Street Journal had expected existing-home sales to hit a rate of 5 million in June.

"We are seeing a more broad-based recovery" in the housing market, said Lawrence Yun, NAR's chief economist. He pointed to an increase in purchases by first-time home buyers, sales rising across all four regions in the U.S., and healthy sales of both single-family homes and condominiums.

But despite the rise, the market hasn't regained its earlier momentum. Compared with a year ago, sales were down 2.3% last month. At the current pace, sales are roughly at the level they were in 2000, even though the U.S. population has grown, the economy has more jobs and interest rates remain at historically low levels. Mr. Yun said the housing market is still "underperforming."

Existing-home sales make up roughly 90% of all home purchases. Home sales were robust in 2012 and the first half of 2013, underpinning the U.S. recovery. But sales slowed in the middle of last year, as a rise in interest rates and a run-up in prices likely scared away many prospective buyers. This winter's harsh weather also likely sapped activity.

Interest rates have fallen back this year, likely helping to boost sales in the crucial spring selling season. Also, robust job growth this year could be boosting the market.

Tuesday's report showed home prices are growing more slowly than in prior months. The median sale price for a home last month was $223,300, up 4.3% from a year earlier.

The inventory of homes available for sale climbed 6.5% from a year earlier. At the current pace, it would take 5.5 months to exhaust the supply, a level close to what economists consider a sign of a "balanced" market.

One factor that could influence the direction of the market is interest rates. The average rate on a 30-year mortgage fell to 4.13% last week, below year-ago levels, according to figures from Freddie Mac. But rates are expected to rise in coming months as the Federal Reserve winds down its bond-buying program, which has helped push down rates to historic lows. Fed officials agreed in their June policy meeting to end the bond-buying program in October.

Write to Josh Mitchell at joshua.mitchell@wsj.com and Alan Zibel at alan.zibel@wsj.com.

Subscribe to WSJ: http://online.wsj.com?mod=djnwires