WASHINGTON - Sales of previously owned U.S. homes unexpectedly fell in August, a survey showed on Thursday, a minor setback for the housing market's recovery from a three-year slump.

The National Association of Realtors said sales fell 2.7 percent to an annual rate of 5.10 million units, from 5.24 million units in July. That compared to market expectations for a 5.35 million unit pace.

NAR Chief Economist Lawrence Yun described the decline as a mild retreat after a strong gain in July, adding that the August pace was the second-highest in 23 months. Compared to August last year, sales were up 3.4 percent.

(Reporting by Lucia Mutikani; Editing by James Dalgleish)