U.S. retail sales recorded their biggest increase in seven months in July as consumers boosted purchases of motor vehicles as well as discretionary spending, suggesting the economy continued to gain momentum early in the third quarter.

The Commerce Department said on Tuesday that retail sales jumped 0.6 percent last month. That was the largest gain since December 2016 and followed June’s upwardly revised 0.3 percent rise.

Economists polled by Reuters had forecast retail sales increasing 0.4 percent in July after a previously reported 0.2 percent decline.

May’s retail sales were also revised up to show no change instead of the previously reported 0.1 percent dip. Retail sales increased 4.2 percent in July on a year-on-year basis.

Excluding automobiles, gasoline, building materials and food services, retail sales surged 0.6 percent last month after an upwardly revised 0.1 percent gain in June. These so-called core retail sales, which correspond most closely with the consumer spending component of gross domestic product, were previously reported to have dipped 0.1 percent in June.

Consumer spending, which accounts for more than two-thirds of U.S….