December was a better month for U.S. retail sales than economists anticipated, an indication that consumers continued to spend despite the threat of higher taxes in the coming year.

According to a report Tuesday from the U.S. Commerce Department, retail and food service sales were a seasonally adjusted $415.70, an increase of 0.5%. Economists surveyed by Dow Jones Newswires had expected a 0.2% rise. Consumers spent less on gasoline as prices fell, while spending more on autos, dining, furniture and personal care.

The White House and Congress worked during the last month of 2012 on a deal to avoid the fiscal cliff, which included tax increases and spending cuts that were set to trigger on Jan. 1. A last-minute agreement was made to raise income taxes on higher earners, delay spending cuts and allow a 2% cut in Social Security withholdings to expire.

Motor vehicles and parts, up 1.6%, had a strong showing in December. Building materials were flat even though rebuilding projects following October’s Hurricane Sandy were expected to boost sales.

Retail sales are closely watched as a measure of consumer spending, which accounts for about two-thirds of demand in the U.S. economy. Excluding autos, gasoline and building materials, retail sales climbed 0.6%.

Excluding autos, retail sales edged up 0.3%.

The Commerce Department also revised November retail sales to a 0.4% gain.

Follow Matthew Rocco on Twitter @MatthewRocco