Sales at U.S. retailers rose more than forecast last month in a broad advance that shows consumers delivered for the economy in the second quarter.

The 0.6 percent increase in June retail receipts exceeded most analysts' highest estimates and followed a 0.2 percent gain the previous month that was smaller than previously estimated, Commerce Department figures showed Friday. So-called core sales, used to calculate gross domestic product, rose a larger-than-projected 0.5 percent for a second month.

A prolonged period of job creation and slowly improving wage gains are providing households with the means to keep spending. Consumers are key to shaping the growth path for the world's largest economy as global demand remains lackluster and threatens to damp business investment.

"This ends up capping a really great quarter for consumer spending," said Omair Sharif, senior U.S. economist at Societe Generale in New York. "There's a bit more confidence about job security, there's a bit more confidence about where things are headed in terms of wages and the economy. All of that is combining to give us the rebound we're seeing in retail sales."

The median forecast in a Bloomberg survey called for a 0.1 percent advance in total sales, with estimates ranging from a decline of 0.5 percent to a 0.3 percent gain. May was previously reported as a 0.5 percent increase. April data were revised to a 1.2 percent increase, from 1.3 percent.

Eleven of 13 major categories showed stronger demand in June from the prior month, including a 1.1 percent advance in receipts at online merchants and a 0.7 percent increase at health and personal-care outlets.

Another report Friday, from the Labor Department, showed consumer prices climbed 0.2 percent for a second month in June, led by higher costs for energy and rents.

Sales of sporting goods, furniture, and building materials also picked up. The 3.9 percent surge in building supplies followed a 2.5 percent plunge in May that was larger than previously estimated, which explained the bulk of the downward revision in total sales during the month.

Automobile dealers' sales rose 0.1 percent in June after falling 0.5 percent in May.