Consumer credit surged in December as shoppers boosted their credit-card debt for the first time in more than two years, supporting views economic activity was gathering momentum.

Total credit outstanding climbed $6.1 billion, the Federal Reserve said on Monday, more than twice the $2.3 billion that Wall Street economists surveyed by Reuters had forecast. That followed an upwardly revised $2 billion increase in November.

It's encouraging that lenders are at least allowing credit card spending to go up, but also it's not great that the only way that extra consumption can be financed is through credit cards rather than hiring income, said Paul Ashworth, chief U.S. economist at Capital Economics in Toronto.

An improving economy has helped bolster consumer optimism, though job growth remains slow. In addition, December marks the culmination of the Thanksgiving-through-Christmas shopping season when consumers are more likely to turn to their credit cards for purchases.

The data confirmed the spurt in consumer spending in the fourth quarter, which contributed to the economy notching up an annual growth pace of 3.2 percent. Consumer spending grew at a 4.4 percent rate in the fourth quarter -- the fastest in more than four years.

December marked the third successive month in which consumer credit outstanding grew. It had risen by a steep $7.7 billion in October before the November and December gains.

Prior to those three increases, consumer credit had contracted for 20 months in a row.

Strikingly in December, revolving or credit-card debt climbed by $3.5 billion -- the first month in which this category of debt had risen since August 2008.

Today's report also supports the recent trend in measures of credit conditions from the Senior Loan Officer Opinion Survey, which showed that tightening standards for consumer-related debt has decreased and demand for such loans has risen, said Theresa Chen, an economist at Barclays Capital in New York.

We expect the headline series to increase further in the coming months, she added.