Sales of previously owned homes in the United States increased at a faster-than-expected annual pace in June, an industry survey showed on Thursday, in the third straight month of gains.

The National Association of Realtors said sales rose 3.6 percent to an annual rate of 4.89 million units from a downwardly revised 4.72 million pace in May. June's reading compared with forecasts for a 4.84 million unit annual pace.

The NAR said it was the first time the industry had experienced three straight months of gain since early 2004, providing some hope the higher data indicate an underlying trend.

U.S. stocks briefly extended gains after the housing data, while U.S. government debt prices turned lower.

The inventory of existing homes for sale declined 0.7 percent to 3.82 million in June. The median national home price fell 15.4 percent to $181,800 from the same period a year ago.

Overall, the news is positive. We have increasing home sales for the third straight month, declining inventory and although prices fell, they declined at a less steep pace, Lawrence Yun, NAR chief economist, told a press conference. The housing market is healing after four years of recession, he said.

He said the inventory of previously owned homes for sale represented 9.4 months' supply at the current pace of sales, down from 9.8 months' in May.

This was still above the historic average of six months' supply, which Yun said was consistent with a national price appreciation of around 4 percent, while seven to eight months' supply would be consistent with no change in median prices.

(Reporting by Alister Bull; Editing by Neil Stempleman)