U.S. retail sales posted their largest gain in five months in February as Americans stepped up purchases of motor vehicles and other goods even as they paid more for gasoline.

Total retail sales increased 1.1 percent, the Commerce Department said on Tuesday, after a 0.6 percent rise in January. The increase was broadly in line with expectations.

Details of the report were fairly upbeat and its tenor was also boosted by upward revisions to the prior months' data, suggesting recent solid gains in employment were helping to cushion consumers against steep rises in gasoline prices.

The big thing for the consumer is that the labor market has improved and there's income growth. Things look better than six months ago, said Stephen Stanley, chief economist at Pierpont Securities in Stamford, Connecticut.

There is a risk if gasoline prices continue to rise. That will bite into household budgets.

U.S. stocks opened higher on the data, while Treasury debt prices fell. The dollar advanced to a near one-month high versus the euro.

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.

A separate report from the Commerce Department showed auto dealers raced to rebuild stocks in January to meet the growing demand from consumers. Motor vehicle stocks increased in January at their quickest pace since July 2010, giving a boost to overall business inventories.

Consumers bought motor vehicles last month even as they paid more for gasoline at the pump. Gas prices rose 20 cents in February, 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.

BROAD-BASED GAINS

Outside autos and gas stations, sales were broad-based, suggesting recent solid gains in employment and modest increases in income were supporting consumer spending.

Employers have added just over half a million new jobs to their payrolls so far this year and the unemployment rate has held at a three year-low of 8.3 percent.

But the brightening labor market picture, which has reduced the chances of further monetary stimulus from the Federal Reserve through a third round of bond purchases or quantitative easing, is at odds with expectations of slower growth this quarter.

Fed officials meet on Tuesday and are not expected to announce any policy changes, opting to wait for more evidence given that unseasonably mild weather has given the economy some lift in the past few months.

In terms of the Fed, I think we still have a long way to go before they feel comfortable about unemployment. However, we have seen improvement, said Camilla Sutton, chief currency strategist at Scotia Capital in Toronto.

The U.S. central bank, which has promised to keep interest rates ultra low at least through late 2014, will release its statement around 2:15 p.m. (1815 GMT).

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.

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.

(Additional reporting by Richard Leong and Luciana Lopez in New York; Editing by Andrea Ricci)