"It has been a long time since we enjoyed such broad-based gains," said David Blitzer, index committee chairman at S&P Indices. But, he added, "one month does not make a trend, particularly during seasonally strong buying months."

Atlanta's housing market improved slightly over the month, though it still posted the only double-digit negative annual return for the 22nd consecutive month. The city saw prices rise 2.3% in April, but they remain down 17% year-over-year.

At the other end of the spectrum, Phoenix had the best annual returns, gaining 8.6%.

Only Detroit and New York saw their annual rates of return deteriorate compared to March.

Analysts were pleased to see the gains, but remain cautious.

Tight inventories of homes for sale in certain markets bode well for continued price gains in those areas, said Luis E. Vergara, director of Mission Capital Advisors in New York. But that's not enough.

"We still need to see greater breadth across markets on a consistent basis to say that we've reached an inflexion point and recovery is underway at the national level," he said.

Also, the pace of home price gains could weaken in coming months since banks are processing foreclosures and short sales more quickly, said Paul Diggle, property economist at Capital Economics. Still, he believes a home price recovery is underway and forecasts that prices will rise in 2012, the first increase since 2006.

The S&P/Case-Shiller follows some positive news on housing. Sales of new homes rose 7.6% and home builders applied for new home permits at the highest rate since September 2008, according to government data for May. Mortgage rates also hit record lows last week.