WASHINGTON — Consumers went out shopping in a big way in July, pushing up retail sales by the largest amount in seven months.

Retail sales advanced 0.6 percent last month, the best showing since a gain of 0.9 percent last December, the Commerce Department reported Tuesday. For most of this year, retail sales have been lackluster, including a decline in May of 0.2 percent and a modest 0.3 percent June gain.

Consumer spending accounts for about 70 percent of economic activity, so the latest result is a good sign for overall economic growth.

Michael Pearce, U.S. economist at Capital Economics, said the strong gain in July sales showed that consumer spending was off to a good start for the third quarter.

“With the labor market still adding jobs at a rapid pace, consumption growth looks set to remain strong for at least the rest of this year,” Pearce said.

Sales gains: Sales got a boost in July from a 1.2 percent jump in auto sales, the strongest result since December. There were sales gains in other areas as well, including furniture stores, hardware stores and restaurants.

The overall economy, as measured by the gross domestic product, grew at a 2.6 percent annual rate in the April-June quarter, a significant rebound from growth of just 1.2 percent in the first quarter. Economists are looking for growth to remain strong in the current July-September period, although some forecast a slight slowdown from the second quarter pace.

They ongoing strong gains in employment will add further fuel to consumer spending. The unemployment rate in July dropped to a 16-year low of 4.3 percent.

For July, sales of furniture, hardware and building supplies and sporting goods were all up. Sales at general merchandise stores posted a tiny 0.1 percent gain. Sales by non-store retailers, the category that tracks internet commerce, posted a strong gain of 1.3 percent. Online shopping has been making major inroads over traditional brick-and-mortar stores.

Pearce said that the surge in online sales reflected in part Amazon’s Prime Day promotion event, which boosted U.S. orders for the giant internet shopping company by 50 percent compared to the same event last year.