By Laura Kusisto

The volatile housing market of the past 15 years is widening the divide between pricey urban and coastal areas and more affordable inland regions, creating large swaths of winners and losers based largely on geography.

Average U.S. home prices rose 5.6% in the 12 months through October, according to the S&P CoreLogic Case-Shiller National Home Price Index, which covers some of the U.S.'s largest metropolitan areas.

Prices in these areas plummeted 27% from the peak of the housing boom in 2006 to the bottom of the bust in 2012, but set a record high in September, according to the index. Adjusted for inflation, prices are still roughly 15% below the peak.

Much of the spoils have been concentrated on the high end. A study by Weiss Analytics, a housing-data firm, foundhomes in ZIP Codes where the median value is $500,000 to $1 million are now worth 103% more than they were 16 years ago, before a boom in the mid-2000s was followed by the worst housing crash since the Great Depression. Home prices in those areas have shot up 39% since the bust.

Yet many places around the U.S. missed out on the recent boom, with prices remaining essentially flat during the same period. In ZIP Codes where the median home was worth $100,000 to $150,000, prices have risen 16% since the trough of the market and are now worth 24% more than they were in 2000.

The contrast offers one explanation for the frustration building in the mostly rural, middle-American areas that helped propel Donald Trump to victory in the presidential election. In counties that voted for Mr. Trump, home prices have been largely flat for the past 15 years, according to a county-by-county analysis of home values and voting patterns by real-estate tracker Zillow.

In areas that went for Hillary Clinton -- mostly coastal urban areas such as California's major markets -- home values plunged from 2006-2012 but have roared back since.

In January 2000, just before the housing market's boom-bust cycle began, homes in counties that voted for Mrs. Clinton in 2016 were worth $36,000 more than those in the counties that voted for Mr. Trump, according to the Zillow analysis. Today, the gap stands at almost $97,000.

The difference is even starker in counties that changed how they voted in this election. In counties that swung for Mrs. Clinton, homes are worth about $147,000 more than homes in counties that swung for Trump.

Urban areas have benefited in recent years from an influx of younger workers seeking high-paying jobs. At the same time, land-use regulations have constricted supply, helping drive up prices. While the wealthiest homeowners had a rocky ride during the past decade, their homes have recovered most or all the value they lost during the bust.

In more rural areas outside major cities, demand for housing has been flat, with little new supply and more people leaving for larger cities and coastal regions.

The demand for lower-priced homes was also weakened by the tightening of lending standards following the foreclosure crisis, which made it more difficult for buyers with imperfect credit scores or lower incomes to qualify for mortgages.

Case-Shiller offers a lagging indicator of the housing market. October's numbers don't reflect the sharp increase in mortgage rates that began after the presidential election. Higher rates tend to put a damper on price growth because they drive up the monthly cost of a mortgage. That combined with prices that have risen faster than incomes could pose challenges to the market next year.

Luzerne County in northeastern Pennsylvania is one area that avoided the worst swings of the housing bust but also has benefited little from the recent recovery.

Peter DeMarco, a real-estate agent in the area, said people there have less money to spend on housing because wages have gone down for many who work factory jobs. He said the recovery lifting the rest of the U.S. economy has been slow in the county, which voted for President Barack Obama in the last election but accounted for roughly 40% of Mr. Trump's winning margin in the state in 2016.

"There wasn't enough attention paid to the economy of us, the small people," he said.

Some economists worry the widening gap could make it more difficult for people in counties like Luzerne to sell their homes to pursue jobs in more prosperous areas with sharply higher housing costs.

On the other hand, many people here said flat home values allow recent college graduates and single parents to move from their parents' house to their own home without renting. In nearby New York City and Philadelphia, middle-class people could spend years renting without saving enough money to buy.

Some starter homes in Luzerne County are priced at less than $100,000, real-estate agents said, meaning a 3% down payment requires only a few thousand dollars in savings.

Sara Levy, an agent in Pennsylvania's Lackawanna County, which voted overwhelmingly for Mr. Obama in the last election but only narrowly for Mrs. Clinton in this one, said she sees people moving back from more prosperous areas because they can't afford to buy homes there.

Nikki Cozza, a 32-year-old interior designer, and her husband, Trevor, searched for two years for a home they could afford in the Rutherford, N.J., area, without luck. Decent homes in the area were priced at about $500,000 and offered about 2,000 square feet, they said. In one instance, they were outbid by about $60,000.

Because they both grew up inthe Scranton, Penn., area, in Lackawanna County, they decided to look for homes there. Soon they were able to find one for about $150,000 less than the New Jersey properties they were considering. It is fairly new, with 3,500 square feet and an ample backyard for their young son, they said.

Ms. Cozza said the area's economic challenges concerned them.

"That did weigh on [my husband] heavily. It was something he did think about, just because there isn't a lot of large industry or businesses here," she said.

For now, Ms. Cozza and her husband, an auditor, work from home most days to avoid the nearly two-hour commute to New Jersey. But she said there are local efforts to rebrand the area.

"We feel confident that there could be a little movement here," she said.

Write to Laura Kusisto at laura.kusisto@wsj.com

(END) Dow Jones Newswires

December 27, 2016 18:51 ET (23:51 GMT)

Copyright (c) 2016 Dow Jones & Company, Inc.