U.S. home sales cratered in December, causing price growth to slip to the lowest level in nearly six years as the housing sector ended 2018 on a decidedly weak note.

The National Assn. of Realtors said Tuesday that sales of existing homes plunged 6.4% to a seasonally adjusted annual rate of 4.99 million last month, the slowest pace in almost three years. For all of 2018, sales of existing homes fell 3.1% from the previous year to 5.34 million units, the weakest total since 2015.

“Looking ahead to 2019, expect weaker existing-home sales as the new year ushered in a government shutdown and worsening economic uncertainty,” said Cheryl Young, a senior economist at Trulia.

Home sales have slowed after years of strong price growth and modest inventories hurt affordability. Properties are sitting on the market longer: In December, the number of days until there’s a signed contract rose to 46, up from 40 days in December 2017.

Higher mortgage rates initially triggered a softening in sales around May and climbed through November, when many of the contracts were finalized for December sales. But rates have stabilized in recent weeks amid concerns about the U.S. stock market and a deterioration in global economic growth.

The median sales price in December was $253,600, up just 2.9% from a year earlier. In a rarity, the modest price growth was eclipsed by the December increase in average hourly wages. If income gains begin to outstrip home price growth, some of the recent affordability pressures could disappear. December’s price gains were the smallest since a decline was posted in 2012.

Sales last month fell in all four of the nation’s regions. But there was a regional divide in price gains. The Northeast posted an 8.2% jump in median prices from a year earlier, and the South had a 2.5% gain. In the West, the price edged up 0.2%. The Midwest was unchanged.