The nation’s housing market continued its slow climb from the depths of the recession in June with the first annual gain in prices in nearly two years, according to a widely watched real estate measure released Tuesday.

The S&P/Case-Shiller national composite index was up 1.2 percent in the second quarter over the second three months of last year. Compared with the first quarter of this year, prices were up a robust 6.9 percent.

The increases in housing prices come after other data showing upticks in sales volumes, housing permits and prices, prompting many analysts to declare that the long-moribund housing market is slowly mending.

“We seem to be witnessing exactly what we need for a sustained recovery: monthly increases coupled with improving annual rates of change,” said David M. Blitzer, chairman of the Index Committee at S&P Dow Jones Indices. “The market may have finally turned around.”

The report also showed that all 20 metropolitan areas tracked by the index rose in June from May, the second consecutive time in which every region posted month-over-month gains. Nationally, the 20-city index increased 0.5 percent from June 2011, the report said.

Home prices show improvement. (The Washington Post/Source: S&P/Case Shiller)

In Washington, which has one of the nation’s strongest housing markets and where prices did not drop as dramatically as in many parts of the country, prices increased 2.1 percent between May and June, according to the index. Over the past year, Washington home prices are up 3.9 percent. Locally, sales volumes have continued to climb, and inventories are down to their lowest point since about 2005, according to recent data from Alexandria-based Delta Associates.

A combination of low prices and rock-bottom interest rates is helping to pump new life into the housing market. But analysts warned that despite the recent gains, the housing sector is a long way from full health.

Nationally, home prices are at early 2003 levels, the report said. Despite other measures showing improvements, some analysts argue that sales volumes remain depressed. Meanwhile, the rate of delinquent mortgages remains far above normal.

“Case-Shiller’s June numbers further affirm what other indices have already been showing, namely that the overall market is healing, albeit at a frustratingly slow pace,” said Stan Humphries, chief economist at the real estate firm Zillow. “While we have seen healthy appreciation for the past few months, we do expect declines in the Case-Shiller indexes in the back half of this year, particularly as the overall monthly sales volume declines.”

Humphries added that while he thought the period of falling home values is past, the remaining high number of homeowners who owe more on their homes than they are worth and the high rate of foreclosures mean “we’re still a few years away from a normal housing market.”

Other analysts said that home prices are not headed back to their pre-recession highs anytime soon — nor should they be.

“In general, the market is headed upwards. Everything seems to be going in the right direction,” said Dean Baker, co-director of the Center for Economic and Policy Research. “But people would be delusional if they think we are going back to 2006 prices and that we are going to see double-digit price increases.”