Retail sales recorded their largest gain in five months in February as Americans snapped up motor vehicles and bought a range of goods even as they paid more for gasoline, government data showed on Tuesday.

Total retail sales increased 1.1 percent, the Commerce Department said, after an upwardly revised 0.6 percent rise in January.

Economists polled by Reuters had forecast retail sales rising 1.0 percent after a previously reported 0.4 percent gain in January.

Sales last month were buoyed by a 1.6 percent rise in sales of motor vehicles, reflecting pent-up demand by households and growing confidence in the economy as job creation speeds up.

A devastating earthquake and tsunami in Japan caused disruptions to auto production last year and left dealers without models that consumers wanted to buy.

Excluding autos, retail sales advanced 0.9 percent last month, adding to January's upwardly revised 1.1 percent gain.

Consumers bought motor vehicles even as they paid more for gasoline at the pump. Gas prices rose 20 cents last month, according to government data.

Sales at gasoline stations surged 3.3 percent, the biggest gain since March last year, after rising 1.9 percent in January. Excluding autos and gasoline, sales rose 0.6 percent in February after increasing 1.0 percent the prior month. Gasoline accounted for 11.5 percent of retail sales in February.

Outside autos and gas stations, details of the report were fairly upbeat, suggesting recent solid gains in employment were supporting consumer spending.

Last month, clothing store receipts jumped 1.8 percent, the largest increase since November 2010, while sales at building materials and garden equipment suppliers advanced 1.4 percent.

Unseasonably mild weather has boosted the volume of traffic to shopping malls even though retailers have had to offer huge discounts to clear shelves of winter clothing and other merchandise.

So-called core retail sales, which exclude autos, gasoline and building materials, were up 0.5 percent after advancing 1.0 percent in January.

Core sales correspond most closely with the consumer spending component of the government's gross domestic product report.

Sales at restaurants and bars rose 0.8 percent, while receipts at sporting goods, hobby, book and music stores increased 1.0 percent. Sales of electronics and appliances rose 1.0 percent, while receipts at furniture stores fell 1.2 percent.

(Reporting by Lucia Mutikani; Editing by Andrea Ricci)