In this June 4, 2015 photo, a customer, center, checks out at a Wal-Mart Neighborhood Market store in Bentonville, Ark. The Commerce Department releases retail sales data for June on Tuesday, July 14, 2015. (AP Photo/Danny Johnston)

WASHINGTON — Americans cut back their spending at stores and restaurants last month, a sign that they remain cautious despite robust job growth in the past year.

Retail sales fell 0.3 percent in June, the Commerce Department said Tuesday, the weakest showing since February's harsh winter weather kept shoppers indoors. That followed a robust 1 percent jump in May, though that was revised down from a previous estimate of 1.2 percent.

Economists had expected that consumers would rein in their spending after May's large gain. But the reversal was much sharper than projected.

"It certainly is a case of 'two steps forward, one step back' for the U.S. economy," Dan Greenhaus, an economist at BTIG, said in a note to clients.

The figures suggest that Americans are still reluctant to spend freely, possibly restrained by memories of the Great Recession.

"Household caution still appears to be holding back a more rapid pace of spending growth," Michael Feroli, an economist at JPMorgan Chase, said in a note to clients.

Still, consumers spent more in the April-June quarter than in the first three months of the year, the data shows. That, in turn, should boost growth in the second quarter to about a 2.5 percent to 3 percent annual rate, up from the first quarter, when the economy shrank 0.2 percent.

And there are signs that consumers are more confident, suggesting that sales could rebound in the coming months.

"One soft month is not a trend," Ian Shepherson, chief economist at Pantheon Macroeconomics, said. "We expect spending to strengthen in the second half."

The Conference Board's consumer confidence index jumped in June to its second-highest level since the recession ended in June 2009. It is now 17.4 percent higher than a year ago.

And Americans are borrowing more: Consumer credit, which includes auto, student and credit card loans and excludes mortgages, rose a healthy 6.5 percent in May from a year earlier.

Even so, June's weak spending was broad-based. Excluding autos, gas, building materials and restaurants, so-called core retail sales — which factor into the government's official measure of economic growth — fell 0.1 percent in June, after an increase of 0.7 percent in May.

Spending at restaurants and bars, an area of strength in recent months, slipped 0.2 percent. Sales of building materials fell 1.3 percent. Online and catalog retailers reported a 0.4 percent drop in sales.

Sales at auto dealers fell 1.1 percent, but that drop came after a big gain in the previous month. Auto purchases reached the highest level in a decade in May, so even with the decline, sales remain at a healthy level.

Economists watch the retail sales report closely because it provides the first indication each month of the willingness of Americans to spend. Consumer spending drives 70 percent of the economy. Yet retail sales account for only about one-third of spending, with services such as haircuts and Internet access making up the other two-thirds.

Overall consumer spending surged in May, the Commerce Department said last month. It jumped 0.9 percent, the most in nearly six years, as income rose and Americans saved less.