Retail sales rose more than expected in December as Americans shrugged off the threat of higher taxes and bought automobiles and a range of other goods, suggesting momentum in consumer spending as the year ended.

The Commerce Department said on Tuesday retail sales increased 0.5 percent after an upwardly revised 0.4 percent rise in November. Sales in November were previously reported to have gained 0.3 percent.

Economists polled by Reuters had expected sales to rise only 0.2 percent. Sales were up 4.7 percent from December 2011 and rose 5.2 percent for the whole of 2012.

So-called core sales, which strip out automobiles, gasoline and building materials and correspond most closely with the consumer spending component of gross domestic product, increased 0.6 percent after advancing 0.5 percent in November.

The second straight month of gains in core sales suggested consumer spending picked up in the fourth quarter after rising at a annual pace of 1.6 percent in the July through September period.

(Reporting By Lucia Mutikani; Editing by Andrea Ricci)