For the first time in two years, home prices in the U.S. rose on a year-over-year basis in June, according to a closely watched measure of real estate values.

The Standard & Poor's/Case-Shiller home price index released Tuesday showed prices rose 0.5 per cent from June 2011.

That provides further evidence of a cautious but unmistakeable recovery in the beleaguered U.S. housing market.

The report showed that prices in all 20 cities tracked by the index rose in June from May. That was the second consecutive report that showed every city posting month-over-month gains.

"The combined positive news coming from both monthly and annual rates of change in home prices bode well for the housing market," said David Blitzer, chairman of the S&P's index committee.

Low mortgage rates and modest economic growth have created more optimism among home buyers and sellers alike. Last month, U.S. home builders applied for the largest number of building permits in nearly four years.

"Persistent news of rising house prices should start convincing prospective home sellers that it's not just a buyers' market," Credit Suisse analyst Jonathan Basile said.

"And when Americans become more comfortable with selling their home, they also become more comfortable with buying another one."

Despite the recent price gains, home prices on average are still about a third cheaper than they were at the peak of the housing bubble in 2006.

Markets in California, Arizona and Florida were particularly hard hit, where prices from peak to trough plunged by half.

With files from The Associated Press