The country’s beleaguered housing market is finally turning the corner – though the New York area appears to be lagging behind.

The closely watched S&P/Case-Shiller Index of property values in 20 cities rose 0.5% in June compared with June 2011, its first gain since September 2010.

But the New York metro area was among just six of 20 metro areas where prices fell, dropping by 2.1% compared with last year. When compared with May, New York area prices rose 2.1%.

“The New York region continues to show an erosion in prices over the past two years,” Jonathan Miller, CEO of real estate appraisal firm Miller Samuel, told the Daily News.

Miller noted that the index does not include co-ops and condos and covers a broad territory including Long Island, Westchester, Fairfield, Northern New Jersey and a county in Pennsylvania.

From a national perspective, the report brought signs that the housing market is in recovery mode, fueled by low interest rates and rising demand.

“We seem to be witnessing exactly what we needed for a sustained recovery,” David Blitzer, chairman of the S&P index committee, said in a statement. “The market may have finally turned around.”

As of the second quarter, average home prices in the country are back to 2003 levels, the survey showed. The S&P/Case-Shiller Index was up 6.9% over the first quarter of 2012 and up 1.2% over the second quarter of 2011.

That marks a big turnaround from the steady declines witnessed during the recession. The National Home Price index hit a record low decline of 18.9% in the second quarter of 2009.

A separate report showed that foreclosures are falling off nationally.

There were 58,000 completed foreclosures in the U.S. in July 2012, down from 69,000 in July 2011 and 62,000 in June 2012, according to CoreLogic.

Approximately 1.3 million homes, or 3.2% of all homes with a mortgage, were in the national foreclosure inventory – meaning they were in some stage of the process – as of July 2012 compared with 1.5 million, or 3.5%, in July 2011.

Month-over-month this year, the national foreclosure inventory was unchanged from June to July.

“The decline in completed foreclosures is yet another positive signal that the housing market is continuing on a progressive path of stabilization and recovery,” said Anand Nallathambi, CEO of CoreLogic in a statement.