Consumers spent more freely than expected last month as declining gasoline prices shielded household budgets, government data showed on Monday, helping lift investor spirits after a week of bruising losses.

Sales at U.S. retailers rose a slightly more-than-expected 0.3 percent in July and core sales, which strip out car, building materials and gasoline sales, were even stronger, the Commerce Department data showed.

The data did not reflect the response of consumers since concerns over credit availability hit in early August, slamming markets and forcing central banks to pump massive amounts of liquidity into the financial system to restore confidence.

Investors nevertheless took heart from the news that household spending remained solid at the start of the third quarter, while upward revisions sales in May and June imply slightly stronger second-quarter economic growth than earlier reported.

Wall Street stocks opened higher, with the Dow Jones Industrial Average up over 50 points by mid-day, while big European bourses also pushed ahead.

The dollar rallied against sterling and the euro. The prices of U.S. government bonds initially retreated after the data eased concerns over the health of the consumer. Treasury prices later recouped lost ground.

The data should be read as saying that the trend was a bit sturdier than previously thought going into this stress -- certainly not a bad thing -- but otherwise not as indicative of ongoing sustainability as might otherwise be the case in calmer circumstances, Goldman Sachs wrote in a note to clients.

It was also the first in a hefty week for data, with producer and consumer prices, trade, industrial production and housing starts all scheduled for release.

Excluding autos, retail sales were up 0.4 percent in July, as forecast, and the prior month was revised to a 0.2 percent decline versus a 0.4 percent fall initially reported.

Economists polled by Reuters forecast overall retail sales to rise 0.2 percent compared with a revised 0.7 percent drop in June, previously reported as a 0.9 percent drop. May was also revised to a 1.6 percent gain from up 1.5 percent.

So-called core retail sales, which exclude cars, gasoline and building materials, advanced 0.6 percent from a 0.3 percent increase in June.

CHEAPER GASOLINE

Purchases of motor vehicles and parts, which make up around one fifth of total sales, fell 0.3 percent. Gasoline, which can have a big impact on consumer spending, fell 0.8 percent.

This report points to an improving trajectory for the consumer. We are not at all surprised, as the peak in gasoline prices came in late May and would have taken their maximum toll on household outlays in June, said Stephen Stanley, chief economist at RBS Greenwich Capital, in a note to clients.

He said the upward revisions to May and June's retail sales could lift second-quarter U.S. gross domestic product growth to a 3.8 percent annual pace from the 3.4 percent rate earlier reported.

Economists had also expected a strong U.S. jobs market to support consumption, despite the impact of cooling U.S. housing and turmoil caused by problems in the market for subprime mortgages for borrowers with risky credit.

In fact, furniture and home furnishings sales rose 0.5 percent and building material and garden supplies were up 0.2 percent. Sales of clothing and accessories jumped 1.3 percent, while sales at food and beverage stores, health and personal care also advanced.

The reported strength was somewhat at odds with the news from U.S. retailers, who had generally announced disappointing sales in July. Wal-Mart Stores Inc., the world's largest retailer, reported a 1.9 percent rise in July sales at U.S. stores but said it had cut prices to attract shoppers.

BUSINESS INVENTORIES UP

In other Commerce Department data, inventories at U.S. businesses rose 0.4 percent in June, matching the forecast.

The inventory gain followed a 0.5 percent rise in May. Sales dipped 0.3 percent in June after climbing 1.3 percent the previous month.

Economists monitor the data for clues on whether businesses are building stocks in anticipation of rising demand, although the judgment is tricky since an increase in inventories can also reflect weaker than anticipated sales.

June's inventory-to-sales ratio, a measure of how long it would take to deplete stocks at the current pace of sales, edged up to 1.27 months' worth from 1.26 in May.