Signed contracts to buy existing homes in the U.S. surged by more than expected in August, data from the National Association of Realtors showed Wednesday.

Pending home sales increased 8.1 percent compared with the prior month, ending a two-month stretch of declines. Analysts had forecast a one percent gain.

Despite the gain, signings are down 8.3 percent from a year ago.

“Rising inventory and moderating price conditions are bringing buyers back to he market,” said Lawrence Yun, the NAR’s chief economist. “Affordability, however, remains challenging as home price gains are roughly three times wage growth.”

Yun added that such an imbalance between wage gains and home price appreciation is unsustainable over the long term. On Tuesday, the Case-Shiller home price index showed prices up nearly 20 percent year over year.

Pending sales were up in each of the four major regions compared with July. They were down compared with a year ago, with the Northeast seeing the largest decline.

The strongest pending sales gains in major metropolitan areas on an annual basis were in communities in Florida, Texas, and Tennessee, three states led by Republican governors that took aggressive steps to lift pandemic restrictions on schools, businesses, and leisure.

The ability of employees remotely has encouraged many to move into more affordable places, Yun said.

Sales in the Midwest rose 10.4 percent on a monthly and were down 5.9 percent from August 2020. In the South, sales climbed 8.6 percent monthly and dropped 6.3 percent annually.

In the West, sales were up 7.2 percent monthly and fell 9.2 percent from a year prior. Pending sales lifted 4.6 percent in the Northeast month to month but were descended 15.8 percent from a year ago.

Contract signings usually lead sales by about 45 to 60 days, so this would usually be for closed sales in September and October.