U.S. pending home sales unexpectedly rose in December for the first time in seven months, wrapping up an otherwise poor year for a housing market battered by higher mortgage rates. 

The National Association of Realtors index of contract signings to purchase previously owned homes increased 2.5% last month to 76.9, according to a release Friday. The median estimate in a Bloomberg survey of economists called for a 1% decline.

For all of last year, contract signings decreased more than 20% as demand weakened on the heels of aggressive interest-rate hikes by the Federal Reserve. Consumers’ views of homebuying conditions are hovering near historic lows, based on University of Michigan survey data.

Recent data, however, have shown some signs that demand is stabilizing as borrowing costs and prices retreat.

“This recent low point in home sales activity is likely over,” Lawrence Yun, NAR chief economist, said in a statement. “Mortgage rates are the dominant factor driving home sales, and recent declines in rates are clearly helping to stabilize the market.”

Pending sales rose in two of four regions in the month, led by a 6.4% gain in the West and a 6.1% pickup in the South.

Pending home sales are often looked to as a leading indicator of existing-home purchases as properties typically go under contract a month or two before they’re sold. The index is based on a sample that covers about 40% of multiple listing service data each month.