Sales at U.S. retailers rose more than expected in November as consumers spent more on gasoline and a wide range of other goods, data showed on Friday, raising hopes of a self-sustaining economic recovery.

The Commerce Department said total retail sales increased 1.3 percent last month, the largest advance since August, after rising by a downwardly revised 1.1 percent in October. It was the second straight monthly gain. Sales in October were previously reported to have increased 1.4 percent.

Analysts polled by Reuters had forecast retail sales gaining 0.7 percent last month. Overall sales in November were boosted by strong receipts from gasoline stations, increased purchases of motor vehicles and parts, building materials and electronic goods among others. Gasoline sales surged 6 percent, the largest increase since June.

Compared to November last year, sales were up 1.9 percent, the first year-on-year gain since August 2008, a Commerce official said.

The data should help to ease concerns that the economy's recovery could falter because of lackluster consumer spending. The economy resumed growing in the third quarter, fueled mostly by government spending.

With the labor market starting to stabilize and household wealth rising, there is growing optimism that consumer spending will soon pick up.

Excluding motor vehicles and parts, retail sales increased 1.2 percent in November, the largest increase since January, after being flat in October. Economists had expected a 0.4 percent increase.

Core retail sales excluding autos, gasoline and building materials rose 0.6 percent, advancing for a fifth straight month.

Sales of building materials climbed 1.5 percent last month, the biggest gain since April 2008, after falling 1.8 percent in October. Purchases of electronics and appliances jumped 2.8 percent, the largest increase since January.

(Reporting by Lucia Mutikani; Editing by Neil Stempleman)