U.S. home-price gains slowed nationwide in the second quarter as sales slipped and an increase in listings gave buyers more choices, the National Association of Realtors said.

The national median price of an existing single-family home was $269,000, which is up 5.3 percent from the second quarter of 2017, the group said in a report Wednesday. The pace slowed from the first quarter, when prices climbed 5.7 percent. Prices climbed in 161 of 178 metropolitan areas measured, with 13 percent of regions having double-digit gains, down from 30 percent in the previous three months.

The U.S. housing market, after years of price gains that outpaced incomes, is showing signs of cooling. Buyers, who face rising mortgage rates as well as higher purchase prices, are thinking twice before overpaying. And more homeowners put properties on the market in June, reversing three years of year-over-year inventory declines.

Total existing-home sales, including single-family and condos, dropped 1.7 percent from the first quarter, to an annual rate of 5.41 million, according to the Realtors group.

“Solid economic growth, a healthy labor market and the large millennial population should be driving home sales much higher,” Lawrence Yun, the group’s chief economist, said in the report. “There’s still a chance for sales to break out this year. However, with mortgage rates trending higher, it will only happen if supply levels improve enough to cool the speedy price growth in a majority of the country.”

About 1.95 million previously owned houses were available for purchase at the end of June, up 0.5 percent from a year earlier, according to the Realtors group.

This article was provided by Bloomberg News.