By J.W. Elphinstone, AP Real Estate Writer

NEW YORK (AP) — If you bought a home in San Francisco in the past year, it might feel like the housing slump is over. Bay area home prices have shot up 18% in the past year.

But someone next door who bought in 2006 may have suffered a 35% loss in value. And if you're a Las Vegas homeowner, there's been no good news in four years.

The latest report on home prices confirms that real estate is all about timing and location.

Nationally, home values rose 1.3% in May from April, according to the Standard & Poor's/Case-Shiller 20-city home price index released Tuesday. And 19 of 20 cities showed price gains month over month.

Yet conditions are hardly uniform across the country. Some cities, such as San Francisco and Washington, have less area to build out and better job markets, so they have suffered less or in some cases recovered more quickly. Even cities like Phoenix and Las Vegas, which endured some of the worst losses after the housing bubble burst, are seeing vastly different trends over the past year.

"Generally, in any recovery, there is always parts of the country that lead the way and certain parts that lag behind," said Jonathan Basile, vice president of economics at Credit Suisse. "To understand why, you have to look at the economies of those areas and how much building went on to help determine why one outperforms and others underperforms."

Take the metro areas in Las Vegas, Phoenix and Miami. Home values soared in all three cities during the early part of the last decade, then plummeted in the last few years. All three have struggled with high foreclosures.

Yet over the past year, while home prices rose 7.2% in Phoenix, they ticked up only 1.2% in the Miami and fell 6.5% in Las Vegas.

Part of the reason is that Phoenix has a healthier job market than the other two cities. Its metro area had an 8.7% unemployment rate in May, one point lower than the national average.

Las Vegas, meanwhile, had a 14.1% unemployment rate in May, while Miami had an 11.2% rate. That left fewer households in position to take advantage of government tax credits for homebuyers that expired in April and the lowest mortgage rates in decades.

Prices in Las Vegas have lost more than half their value since peaking in August 2006. And the long-term picture isn't rosy either. Home values there have risen a mere 2% since 2000, according to S&P/Case-Shiller.

Miami home prices are up 46% since the beginning of the decade, but just 1% over the past year. High-end sales have helped boost the median price. In the last three months, there were five sales between $8.7 million and $15 million. There have been only 27 of those in the past nine years, said Ron Shuffield, president of Esslinger-Wooten-Maxwell Realtors Inc.

And prices could drop quickly in Miami over the next year. Nearly 23% of those homeowners with a mortgage in the area have either missed three consecutive payments or were in foreclosure, according to Moody's Analytics. That compares with 10% in Phoenix and 15% in Las Vegas.

"Just like in the housing boom period you had significant divergence by regions, in the early periods of recovery, we're seeing similar divergence," said Zach Pandl, analyst at Nomura Global Economics. "But it's not exactly the same cities in these groups."

Of all cities, San Francisco has shown the sharpest turnaround. After values plunged 46% to their low in March of last year, they have regained 21%, the best performance in the S&P/Case-Shiller report.

Doug Duncan, chief economist at mortgage giant Fannie Mae, said housing is healthier in big cities in the Northeast and on the West Coast because they have limited land for construction and better local economies.

With desirable San Francisco, "you have an ocean on one side and some mountains on the other side," he said.

State homebuying tax credits and a shorter foreclosure process also have helped California housing markets.

Federal tax credits for homebuyers helped prop up prices in cities like Minneapolis where the median home price is just under $170,000. Home values there rose nearly 3% in May from April and nearly 13% from last year, S&P/Case-Shiller showed.

"But the wind has been taken out of our sails since the expiration and prices are flattening out, especially for entry-level homes," said Pam Kowalski with Counselor Realty in Minneapolis.

Most economists don't expect the price increases to last through the year. And many predict prices will fall through the rest of the year. A high number of foreclosures will continue to weigh on prices in many areas, and job uncertainty and tight credit are still keeping many would-be buyers sidelined.

"I bet in six months, 15 to 20 cities will have falling prices," said IHS Global Insight economist Patrick Newport. He predicts prices will fall a further 6% to 8% before turning around next year.

The pain, though, likely won't be equally shared.

AP Business Writers Christopher S. Rugaber and Alan Zibel in Washington contributed to this report.

Copyright 2010 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

—For the best rates on loans, bank accounts and credit cards, enter your ZIP code at