Home prices are still rising, but the pace of the gains continues to slow, as potential homebuyers hit an affordability wall and sellers cave to the new reality.

Home prices rose 6 percent annually in July, down from the 6.2 percent gain in June, according to the S&P Corelogic Case-Shiller national index.

The 20-city index rose 5.9 percent annually, down from 6.4 percent in June. The 10-city index rose 5.5 percent annually, down from 6.0 percent the previous month.

"Rising homes prices are beginning to catch up with housing," says David M. Blitzer, managing director and chairman of the index committee at S&P Dow Jones Indices. "Sales of existing single family homes have dropped each month for the last six months and are now at the level of July 2016. Housing starts rose in August due to strong gains in multifamily construction. The index of housing affordability has worsened substantially since the start of the year."

Las Vegas, Seattle and San Francisco continue to see the biggest annual gains in home prices, with increases of 13.7 percent, 12.1 percent and 10.8 percent respectively. Five of the 20 cities saw home price gains accelerate annually compared with June.

Since home prices last bottomed in 2012, following the epic housing crash, 12 of the 20 cities tracked by S&P Corelogic Case-Shiller have reached new highs, although those are not adjusted for inflation. Those that are still lower were some of the cities that saw the greatest gains during the last housing boom, like Las Vegas, Miami, Phoenix and Tampa. All those cities are still seeing strong price gains now, especially Las Vegas, which leads all the cities in gains.

While demand for housing is still strong, a continued shortage of for-sale listings has overheated prices throughout much of the past year, and buyers stepped back.

More than one-quarter of sellers in early September had reduced their list prices, according to a recent report from Redfin, a real estate brokerage. Homes are sitting on the market longer, and sales continue to slow, especially in some of the previously hottest markets in Southern California.

Mortgage rates are also eating into affordability. They have been rising steadily for the past few weeks and are now at the highest level in at least seven years.

WATCH: How to use your home as a source of cash