Sales at retailers unexpectedly fell in May for the first time since September following a record slump in purchases of building materials, adding to fears the economic recovery was losing some steam.

Friday's report follows last week's data showing a sharp slowdown in private hiring in May, but analysts still saw little risk of the economy slipping back into recession.

The report is not evidence that the economy is getting ready for a double-dip or that consumers, facing headwinds of double-digit unemployment and bank credit restriction, are taking their ball and going home, said Chris Rupkey, chief financial economist at Bank of Tokyo/Mitsubishi in New York.

Total retail sales dropped 1.2 percent after rising 0.6 percent in April, the Commerce Department said.

Analysts polled by Reuters had forecast retail sales increasing 0.2 percent last month. Retail sales, which had risen for seven straight months, were up 6.9 percent compared to May last year.

The data had a major impact on markets immediately, prodding many investors to quickly reduce exposure to riskier assets and seek out safe havens.

Major U.S. stock indexes opened on a weak note after the data, while 30-year U.S. Treasury bonds pushed more than a point higher to yield 4.17 percent. The U.S. dollar shed earlier gains against the yen.

There's no getting around the fact you saw some consumer retrenchment in the month of May. The number is going to call into question the strength of consumer spending for the second quarter, said Kevin Flanagan, chief fixed income strategist at Morgan Stanley Smith Barney in Purchase, New York.

HIGH UNEMPLOYMENT

Private businesses unexpectedly held back on hiring in May after expanding payrolls for two months, a trend which could undermine recovery from the worst recession since the 1930s.

Restoring the economy to health is a key priority for President Barack Obama and voter anguish over the slow pace of the recovery could inflict heavy losses on the Democratic Party in November's Congressional elections.

Consumer spending accounts for about 70 percent of U.S. economic activity, but with the unemployment rate near 10 percent, households' spending habits have become more cautious than during previous recoveries.

Consumers are still choosing to increase their savings and reduce their borrowing and spending because their balance sheets are leveraged, and they are very concerned about the economy given the stock market and employment conditions, said Hugh Johnson, chief investment officer at Johnson Illington Advisors in Albany, New York.

Sales last month were dragged downed by a record 9.3 percent drop in receipts from building materials and garden equipment suppliers, which could reflect a drop in construction following the end of a popular homebuyer tax credit.

Motor vehicle and parts receipts also fell 1.7 percent, although dealers reported a rise in sales.

Excluding autos, sales fell 1.1 percent in May, the largest decline in 14 months, after rising 0.6 percent in April. Markets had expected sales excluding autos to gain 0.1 percent.

However, core retail sales -- which exclude autos, gasoline and building materials -- rose 0.1 percent after falling 0.2 percent in April. Core sales correspond most closely with the consumer spending component of the government's gross domestic product report.

Clothing and clothing accessories sales dropped 1.3 percent, while gasoline receipts fell 3.3 percent, the largest decline since March 2009.

There were a few bright spots in the report, with sales at sporting goods, hobby and book stores rising 0.4 percent in May after falling 1.3 percent in April.

Receipts at electronics and appliance stores increased 0.6 percent, reversing the prior month's fall.

(Additional reporting by Ellen Freilich, John Parry and Caroline Valetkevitch, Editing by Chizu Nomiyama)