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

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

“Looking ahead to 2019, expect weaker existing-homes 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. More properties are sitting on the market, as days until a signed contract increased to 46 from 40 days a year ago.

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 percent from last year. 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 worst since a decline was posted in 2012.

Sales last month fell in all four geographical regions: Northeast, Midwest, South and the West.

But there is a regional divide in price gains. The Northeast posted an 8.2 percent jump in median home prices, and the South enjoyed a 2.5 percent gain.

The partial U.S. government shutdown has yet to hit the housing market, although Lawrence Yun, the chief economist for the Realtors, said it could hurt sales in upcoming months by 1 percent.