Growth in U.S. home prices slowed in December for the ninth consecutive month, but buyers are still struggling with affordability.

National home prices rose 4.7% in December, down from 5.1% in the previous month, according to S&P CoreLogic Case-Shiller. In the 20-city composite, which measure changes in residential house prices in 20 large metropolitan regions in the United States, the year-over-year gain came in at 4.2%, down from 4.6% in November.

Rising mortgage rates, coupled with previous price gains, are putting many homes out of reach for prospective home buyers. Even as home price gains are slowing, they are still increasing faster than average wages, making homes more difficult to afford. The situation is also hurting sellers, who may have to lower their asking prices and wait longer to sell.

“House prices are starting to get high enough now that, related to income, there is going to be restraint,” said Stan Shipley, managing director and economist at Evercore ISI. “Even with low mortgage rates, home buyers still have sticker shock when they are trying to buy a home.”

Economists see the smaller gains as a sign that the housing sector has largely played itself out, but that does not necessarily mean bad news for the economy.

“The slowdown is more modest and not as apocalyptic as we saw in 2008,” said Michael Englund, chief economist at Action Economics LLC. “Even though the economy overall continues to grow, the housing sector has topped its growth. It is as large as it wants to be, and it does not want to grow.”

In addition to low affordability and rising interest rates, experts see another cause for concern about the outlook for the housing market: millennials. They are buying homes to a lesser extent than Generation X and the baby boomers. When they do buy homes, millennial first-time home buyers are generally doing so later in life than previous generations.

“We have yet to reclaim the level of transaction activity we had on the home market before 2018,” Englund said. “Millennials are more prone to see other things as financial investments, while the older generation saw real estate as a safe investment. It is not clear if millennials prefer buying a house over renting.”

Monthly sales of existing single-family homes declined throughout 2018, reaching an annual rate of 4.45 million in December.

Among the 20 cities in the composite, Las Vegas, Phoenix and Atlanta reported the highest year-over-year gains, indicating that prices are still rising more steadily in places where homes are more affordable. Three of the 20 cities reported greater price increases in the year ending December 2018 versus the previous month.

Metro areas like New York and Miami have long struggled with low affordability and are approaching peak home prices. In many high-demand West Coast cities, including Seattle, San Francisco and Los Angeles, home price gains are slowing sharply. Whereas homes in cities in the South and East, and cities like Albany and Chicago, are much more affordable and safer, as the gap between house prices and income is smaller.

For many Americans, owning a home is a fundamental financial safety net, and increasing home values can make consumers more confident about spending. Declines in housing prices and activity would usually be seen a cause for concern, as serious problems in the housing market have previously tipped the economy into recession.

Even though the economy has slowed it remains steady, and economists say that, as in 2007, there is no sign it will fall into recession, despite some issues in the housing market.

“The housing market is probably in okay shape,” Shipley said. “Home prices are still up 5% year-over-year, which means home owners get a good return on their investment.”