WASHINGTON - Pending sales of previously owned U.S. homes raced to a two-year high in July, a real estate trade group said on Tuesday, giving more evidence that a recovery in the housing market was under way.

The National Association of Realtors said its Pending Home Sales Index, based on contracts signed in July, rose 3.2 percent to 97.6, the highest level since June 2007, from 94.6 in June. Pending home sales contracts have risen for a record six straight months.

Analysts polled by Reuters had forecast pending home sales to rise 2.0 percent in July. Pending sales were 12 percent higher in July compared to the same period last year.

The recovery is broad-based across many parts of the country. Housing affordability has been at record highs this year with the added stimulus of a first-time buyer tax credit, said Lawrence Yun, NAR chief economist.

NAR estimates between 1.8 million to 2.0 million first-time buyers will take advantage of the $8,000 tax credit this year and that roughly 350,000 additional sales would not have taken place without the credit. The scheme expires in November.

Recent data have suggested the housing market is starting to dig out of a three-year slump. The collapse of the housing market was the main trigger of the worst U.S. recession in 70 years.

A recovery in the housing market would help combat losses at financial institutions, which have been battered by defaults on mortgages.

It would also improve the psychology of households, whose net worth has been decimated by the plunge in home values and encourage consumers to spend rather than save, analysts say.

The pending home sales index in the Northeast fell 3.0 percent to 78.8 in July but was 4.7 percent higher than the same period last year, the NAR said.

In the Midwest the index slipped 2.0 percent to 88.1 but was 8.1 percent above a year ago. Pending home sales activity in the South rose 3.1 percent to an index of 103.8, while contract activity in the West jumped 12.1 percent to 112.5.

(Reporting by Lucia Mutikani; Editing by Kenneth Barry)