Prices of U.S. single-family homes fell for the first time in four months in June, and by an adjusted 1.7 percent from a year earlier, the Federal Housing Finance Agency said on Wednesday.

The FHFA index, which is calculated using purchase prices of homes financed with mortgages that have been sold to or guaranteed by Fannie Mae FMNA.OB or Freddie Mac, fell 0.3 percent in June after a downwardly revised 0.4 percent May increase. The increase in May was previously reported at 0.5 percent.

The index fell by a seasonally adjusted 1.7 percent for the 12 months ending in June.

Home prices, however, gained on a quarter-over-quarter basis.

The gauge in the second quarter rose 0.9 percent from the first quarter, but dropped 1.6 percent from the second quarter of 2009.

The U.S. index as of June is 12.6 percent below its April 2007 peak, the regulator said.

The drop in prices in June offset some of the price increases in the prior months, FHFA said.

(Reporting by Julie Haviv; Editing by Padraic Cassidy)