Sales at U.S. retailers unexpectedly fell in March, snapping two months of increases, as motor vehicle and electronic good purchases declined, according to a government report on Tuesday that indicated subdued consumer spending amid rising unemployment.

The Commerce Department said total retail sales dropped 1.1 percent after rising by a revised 0.3 percent in February, previously reported as a 0.1 percent fall.

Excluding motor vehicles and parts, sales fell 0.9 percent in March, compared to a 1 percent gain the prior month. The data highlighted the continuing problems in the U.S. auto industry, with vehicle and parts sales dropping 2.3 percent after a 3 percent decline in February.

Analysts polled by Reuters had forecast retail sales rising 0.3 percent in March. Excluding motor vehicles, sales had been predicted to be flat.

Gasoline sales fell 1.6 percent in March after increasing by 3.1 percent the previous month. Sales of electronic goods tumbled 5.9 percent, versus a 0.7 percent gain in February, while building materials eased 0.6 percent after slipping 0.5 percent.

(Reporting by Lucia Mutikani; Editing by Neil Stempleman)