U.S. sales of existing homes were unchanged in August, as a shortage of houses priced at less than $250,000 — a level considered to be affordable for the middle class — has become a drag on the real estate market.

The National Association of Realtors said Thursday that homes sold last month at a seasonally adjusted annual pace of 5.34 million. Existing home sales have fallen 1.5 percent during the past 12 months.

Price gains are moderating, and the total number of sales listings is increasing, a marked change from roughly three years’ worth of annual declines in inventory. But the sales momentum is increasingly concentrated on homes worth more than $500,000, while sales of homes worth less than $250,000 have tumbled over the past year.

Still viewed as a foundation for the U.S. middle class, home ownership has become a challenge for many Americans as prices have been rising at a faster pace than incomes for roughly the past five years. The relative robust job market has boosted demand over the past year, yet borrowing costs have shot up and created affordability pressures that are relegating many would-be buyers to the sidelines.

“A strong economy is no longer enough to prop up home buying demand,” said Cheryl Young, a senior economist at the real estate company Trulia. “Home buyers are sensing that the market is near or at an apex and many are pulling back to see when prices may finally begin to tip in their favor.”

There were 1.92 million existing homes for sale at the end of August, up from 1.87 million a year ago.

RELATED:  Homebuilding in Colorado Springs hits 13-year high in 2018

The median sales price in July increased 4.6 percent from a year ago to $264,800. Home prices are no longer climbing as quickly as they did in 2017 and 2016, although the gains are still greater than average wage growth.

Sales rose last month in the Northeast and Midwest, but they fell in the South and West.

Nationally, there has been a 1.7 percent decline in the sale of homes priced between $100,000 and $250,000 in the past year. But the sale of homes worth more than $1 million has jumped by 11.8 percent, a sign that the greater concentration of wealth among the top sliver of households is reshaping how the U.S. housing market operates.

Higher mortgage rates also appear to be a drag on sales.

This week, the average 30-year fixed-rate mortgage charged an interest rate of 4.65 percent, according to mortgage buyer Freddie Mac.

The average has jumped from 3.83 percent a year ago because of the solid economic growth, rising government debt and intensifying showdown between China and the United States on trade, said Sam Khater, Freddie Mac’s chief economist.