Sales at U.S. retailers fell by a smaller-than-expected margin in February after a surprise gain the prior month, as a rise in gasoline prices limited the impact of slumping vehicle sales, a government report showed on Thursday.

Excluding motor vehicles and parts, sales increased 0.7 percent in February, compared to a 1.6 percent advance the previous month. Vehicle sales plunged 4.3 percent, after a surprise 3.1 percent rise the prior month.

Analysts polled by Reuters had forecast February retail sales falling by 0.5 percent. Excluding motor vehicles, sales had been predicted to ease by 0.2 percent.

Gasoline sales climbed 3.4 percent, the biggest rise since November 2007, after increasing by 2.8 percent in January. Sales of building materials dipped 0.2 percent in February after slipping 1.3 percent in the prior month.

(Reporting by Lucia Mutikani, Editing by Andrea Ricci)