U.S. retail sales rose in May for the first time in three months and the number of workers filing new claims for jobless benefits last week hit a January low, fostering hope the recession was abating.

The Commerce Department said on Thursday that sales at U.S. retailers rose 0.5 percent last month, lifted by strong gasoline and building material receipts, after falling by 0.2 percent in April.

A separate report from the Labor Department showed the number of U.S. workers filing new claims for unemployment benefits fell by 24,000 to 601,000 last week, the lowest since the week of January 24.

The data are less bad. We are on track for growth in the third quarter, said Stephen Gallagher, chief U.S. economist at Societe Generale in New York.

U.S. stocks rose, cheered by the data and a solid auction of longer-dated government bonds, which allayed fears over the country's ballooning budget deficit. The Dow Jones industrial average ended 0.4 percent higher at 8,770.92, after rising as high as 8,877.93.

Treasury debt prices rose strongly, pulling benchmark yields back from eight-month highs above 4 percent, while the U.S. dollar fell broadly as the economy's improving prospects eroded some of the currency's safe-haven appeal.

The data were the latest in a series to bolster the argument that the economy's severe recession was close to hitting a bottom, with the sales report raising optimism that consumer spending would probably be flat to only modestly lower in the second quarter.

But there are worries that higher gasoline prices, which boosted retail sales in May, could hurt the economy. Gasoline prices rose every week in May, according to government data, increasing from $2.13 a gallon at the beginning of the month to $2.57 by June 1.

Excluding sales at gasoline stations, retail sales rose just 0.2 percent, after declining by 0.2 percent in April, the Commerce Department said.

The (economy's) tender green shoots could be snuffed out by the frost of higher mortgage rates and gasoline prices, said T.J. Marta, chief market strategist at Marta on the Markets in Scotch Plains, New Jersey.

Growing hope that the 18-month-old recession will soon be over and worries about surging U.S. government debt issuance have boosted yields on U.S. Treasuries in recent weeks.

WHITHER THE U.S. CONSUMER

The yield on the 10-year Treasury note, a benchmark for many mortgages, hit 4 percent on Wednesday for the first time since October and revisited that level briefly on Thursday in a potential challenge to the hoped-for economic recovery.

Consumer spending, which accounts for about 70 percent of U.S. economic activity, rose at a 1.5 percent annual rate in the January-March period after a 4.3 percent dive in the fourth quarter of last year.

Consumers, buffeted by lost income from rising unemployment and falling home prices, have largely refrained from splurging and prefer to either save or pay off debt with the extra cash from tax cuts and government transfers.

Data from the Federal Reserve on Thursday showed household net worth dropped by $1.3 trillion in the first quarter to $50.4 trillion, with debt contracting at a 1.1 percent annual rate after a 2.2 percent fall in the fourth quarter.

But with confidence picking up and the pace of job losses showing signs of abating, analysts expect consumers to loosen their purse strings in the second half of the year.

You are seeing some return of momentum suggesting that maybe we will see some return to growth from the consumer in the second half of the year, though not necessarily strong, said Societe Generale's Gallagher.

Gasoline sales jumped 3.6 percent last month after dropping 0.8 percent in April, while sales of building materials climbed 1.3 percent, the biggest gain since April last year. Car sales rose 0.5 percent.

A third report showed businesses continued to pare inventories sharply in April. The Commerce Department said inventories dropped 1.1 percent, the eighth monthly decline in a row, with stocks of motor vehicles down a sharp 2.4 percent.

The sharp paring of stocks that had built up as the economy went into a tailspin toward the end of last year should lay the groundwork for a pickup in activity as demand revives.

The Commerce Department said on May 29 that inventories fell $91.4 billion in the first quarter after a $25.8 billion drop in the final three months of last year.

While initial claims for state unemployment insurance benefits declined for the fourth straight week last week, the number of people staying on the benefit rolls after collecting an initial week of aid rose to a record 6.82 million in the week of May 30.

It was the 19th week in a row so-called continued claims set a record.

The labor market is in a situation where you are not seeing a lot of hiring, but the pace of firing is slowing down. This is probably consistent with continued increase in the unemployment rate, said Nick Kalivas, vice president of financial research at MF Global in Chicago.

(Additional reporting by Mark Felsenthal and Lisa Lambert in Washington and Richard Leong in New York; Editing by Neil Stempleman)