Pending sales of previously owned U.S. homes rose unexpectedly in July, an industry group said on Thursday, suggesting a tax credit-related housing market decline was close to bottoming.

The National Association of Realtors said its Pending Home Sales Index, based on contracts signed in July, increased 5.2 percent to 79.4 from June. June contracts were revised to show a slightly bigger 2.8 percent decline instead of the previously reported 2.6 percent fall.

Compared to the July last year, pending home sales fell 19.1 percent. Economists polled by Reuters forecast the index, which leads existing home sales by a month or two, falling 1.0 percent in July.

Home sales and building activity have dropped sharply following the end in April of a popular tax credit for home buyers.

Home sales will remain soft in the months ahead, but improved affordability conditions should help with a recovery, said Lawrence Yun, NAR chief economist.

(Reporting by Lucia Mutikani; Editing by Padraic Cassidy)