WASHINGTON (Reuters) - Contracts to buy previously owned U.S. homes surged in July after two straight months of declines as demand rose almost across the board, suggesting the housing market remains on solid ground despite last month's drop in home resales.

The National Association of Realtors said on Wednesday its Pending Home Sales Index, based on contracts signed last month, increased 1.3 percent to 111.3, the second highest reading in over a decade.

Pending home contracts become sales after a month or two, and last month's implied a pickup in home resales after they declined 3.2 percent in July. Economists had forecast pending home sales rising 0.6 percent last month.

Demand for housing is being driven by the labor market, which is steadily generating steady increases in wages as it nears full employment. Data on house prices, residential construction, new home sales and home builders' confidence have been upbeat in recent months.

Pending home sales rose 1.4 percent from a year ago. Contracts increased 0.8 percent in the Northeast and jumped 7.3 percent in the West. They gained 0.8 percent in the South, but fell 2.9 percent in the Midwest.

(Reporting by Lucia Mutikani; Editing by Andrea Ricci)