The suburbs are back.

For most of the past five years, homebuyers in the U.S. have flocked to vibrant sections of cities where they can walk to a grocery store, restaurants and shops. But new data from Redfin Corp. show that soaring home prices are starting to pump the brakes on that trend, because people simply can’t afford to live in places where they don’t need a car.

Sale prices in “walkable” neighborhoods climbed 2.3% in the year ended in July, while those where residents need a vehicle to run errands rose 4.3%, the company found. The trend was particularly stark in high-cost coastal metros, including Seattle and San Jose, California, where values fell in walkable areas year-over-year, but rose in car-dependent neighborhoods. Homes in walkable neighborhoods were on average about $30,000 costlier.

“It’s not that people value walkability any less than they used to,” Redfin Chief Economist Daryl Fairweather said in a statement. “Many homebuyers are simply relegated by their budgets to live in car-dependent areas.”

The data underscore how, during one of the country’s longest-ever economic expansions, affordability is driving much of the U.S. housing market. Competition is heating up for starter homes, but sagging for higher-cost inventory. Lower-cost cities are booming, while more-expensive areas are starting to see price declines.

In Midwestern cities like Kansas City and Columbus, Ohio, where home values are lower, walkable neighborhoods still held their allure. Home prices there climbed faster than for areas that require driving. But both categories were up year-over-year.

This article was provided by Bloomberg News.