US consumer spending, the main driver of the world's largest economy

US consumers opened their wallets wider in June, spending big at building and garden supply stores as the summer season kicked in, the Commerce Department reported Friday.

Consumer spending, the main driver of the world's largest economy, gained 0.6 percent to $457 billion in June, rising for the third straight month.

That was much better than expected, after an 0.2 percent gain the previous month. For the three months to June, retail sales were up 2.6 percent from a year ago.

"This is a stronger report than we expected and it raises our Q2 consumption forecast to 4.5 percent from 4.2 percent," said Ian Shepherdson of Pantheon Macroeconomics.

"The second-quarter pace cannot be sustained, but the momentum in core retail sales seems quite solid."

Building material and garden supplies sales registered the largest month-over-month gain at 3.9 percent, and gasoline sales also jumped.

Online retailers continued to see sales boom, with sales rising 1.1 percent. Department stores rang up 0.7 percent more sales. Clothing store activity fell.

Americans spent less at restaurants and bars last month, but more at food and beverage stores. Auto sales barely rose amid a cooling market after the 2015 boom. 

The government reports its first estimate of second-quarter economic growth on July 29. Analysts expect a pick up from the 1.1 percent annual pace of the first quarter.