After two months of declines, the National Association of Realtors’ Pending Home Sales Index inched up a bit in July, contrary to the expectations of most economists.

The Index, which tracks resale contracts, rose 5.2% in July over June to 79.4. (NAR had revised its June number downward.) Bloomberg News reported on Thursday morning that the 37 economists it polls monthly about trends in home sales, productivity, and factory orders found them anticipating that the July Pending Home Sale Index would fall by a median of 1%. Economists polled by Reuters came to the same projection about pending home sales.

These economists based their guesses on market conditions that saw pending home sales fall by 29% and 2.8% in May and June, respectively, from their previous months.

And while the actual July Index was up over June, it was still 19% lower than the comparable Index in July 2009, NAR reports.

Lawrence Yun, NAR’s chief economist—whom Joe Nocera, who writes an economics column for TheNew York Times, recently blasted for his overly rosy spin on terrible existing-home sales figures—said in a prepared statement that “improved affordability” is abetting the housing industry’s recovery, albeit only gradually.

“Home sales will remain soft in the months ahead,” Yun said in the statement. “But the recovery looks to be a long process. Home buyers over the past year got a great deal, and buyers for the balance of this year have an edge over sellers.”

Yun added that it could take “over a decade” for homeowners who purchased their homes at or near peak prices to recover their home equity.

The West saw the biggest gain in July, with its Index up 11% over June (although still off by 17.6% from July 2009). The South saw the least improvement, 2.1% over June (and 15.6% below July 2009). In the Northeast, the Index increase 6.3% over June (off 21.1% from a year ago), and the Midwest enjoyed a 4.1% gain in pending home sales, although its Index was off 25.7% from July 2009.

John Caulfield is a senior editor for BUILDER magazine.

Learn more about markets featured in this article: Washington, DC.