U.S. retail sales rose more than expected in July as households boosted purchases of motor vehicles and clothing, suggesting the economy remained strong early in the third quarter.

The Commerce Department said on Wednesday retail sales increased 0.5 percent last month. But data for June was revised lower to show sales gaining 0.2 percent instead of the previously reported 0.5 percent rise.

Economists polled by Reuters had forecast retail sales nudging up 0.1 percent in July. Retail sales in July increased 6.4 percent from a year ago.

Excluding automobiles, gasoline, building materials and food services, retail sales advanced 0.5 percent last month after a downwardly revised 0.1 percent dip in June. These so-called core retail sales correspond most closely with the consumer spending component of gross domestic product.

Core retail sales were previously reported to have been unchanged in June. Consumer spending is being supported by a tightening labor market, which is steadily pushing up wages. Tax cuts and higher savings are also underpinning consumption.

July's increase in core retail sales suggested the economy started the third quarter on solid footing after logging its best performance in nearly four years in the second quarter.

GDP surged at a 4.1 percent annualized rate in the April-June period, almost double the 2.2 percent pace in the first quarter. While the economy is unlikely to repeat the second quarter's robust performance, growth in the July-September period is expected to top a 3.0 percent rate.

Auto sales rose 0.2 percent in July after edging up 0.1 percent in June. Receipts at service stations increased 0.8 percent. Sales at clothing stores rebounded 1.3 percent after declining 1.6 percent in June.

Online and mail-order retail sales increased 0.8 percent, likely boosted by Amazon's "Prime Day" promotion. That followed a 0.7 percent rise in June. Americans spent more at restaurants and bars, lifting sales 1.3 percent.

But receipts at furniture stores fell 0.5 percent and sales at building material stores were unchanged last month. Spending at hobby, musical instrument and book stores declined further in July, falling 1.7 percent.