U.S. single-family home prices rose in July albeit at a slightly slower pace, though their gain from a year ago was the strongest in more than seven years, a closely watched survey showed on Tuesday.

The S&P/Case Shiller composite index of 20 metropolitan areas rose 0.6 percent on a seasonally adjusted basis, compared to economists' forecasts for a 0.8 percent gain. Prices rose 0.9 percent in June.

On a non-adjusted basis, prices rose 1.8 percent.

Compared to a year earlier, prices were up 12.4 percent, matching economists' expectations and marking the strongest rise since February 2006. Prices were up 12.1 percent in the year to June.

The report suggested the housing sector continues to recover despite a recent rise in mortgage costs. Economists have pointed to a stronger housing market as a bright spot in the U.S. economic rebound.

Prices in all 20 cities rose on a non-seasonally adjusted yearly basis, led by a 27.5 percent surge in Las Vegas and followed closely by a 24.8 percent gain in San Francisco.