Retail sales last month rose at their fastest pace in more than two years, suggesting that consumers were optimistic about the economy despite uncertainty over jobs and the stock market.

Excluding auto purchases, retailers rang up $212.5 billion in sales in January, up 1.3 percent from the previous month, the Commerce Department said. It was the largest gain since September 2000, surprising many financial analysts.

"Consumers are continuing to hold this economic ship afloat," said Sung Won Sohn, chief economic officer at Wells Fargo & Co. "The bottom line is consumer buying power is rising -- not falling."

The numbers look somewhat darker once a 7.5 percent drop in auto sales last month is added in. But economists said auto sales are notoriously volatile and last month's decline followed near-record sales in December, a pace that could not be sustained. With autos included, total retail sales slid 0.9 percent.

More worrying, economists said, was the potential impact of a war in Iraq. They warned that consumer optimism may prove fragile if hostilities erupt. An extended war -- and a sharp rise in gasoline prices -- could curb consumers' appetite for spending on anything other than necessities. Since consumer spending accounts for more than two-thirds of the nation's economic activity, the potential impact on growth could be substantial.

For now, however, Sohn said consumers are buoyed by the low 5.7 percent jobless rate and the rise in real income as a result of low inflation. If spending continues at the current pace, Sohn said, the economy could grow at an annual rate of 4 percent in the first quarter, up from the consensus forecast of 2 to 2.5 percent

January's spending was strongest in grocery stores, which experienced a 3 percent increase. The gain was unusual because food prices have been slipping, analysts said. Even sales at restaurants and drinking places, usually the first to suffer in tough times, were up 1.1 percent since December.

Less surprising was a 2.9 percent increase in building materials and garden equipment, spurred by robust home sales and construction.

Sales at gas stations climbed 2.7 percent. "You can get a big increase, not because consumers are driving a lot, but because gasoline prices are rising," said Hugh Johnson, chief investment officer at First Albany Asset Management Corp. "Part of the strength in January is a function of prices as opposed to newfound optimism."

David Wyss, chief economist at Standard & Poor's Corp., said the impact of rising prices was limited. Gas stations account for only 7 percent of retail sales and energy accounts for only 4 percent of consumer spending, he said.

Wyss is also one who worries about the outbreak of war. "I'm optimistic as long as nothing goes wrong -- and there's a lot that can go wrong out there."

Frank Badillo, senior economist at Retail Forward Inc., said that declining sales in some sectors suggest consumers are already scaling back. Sales at electronics and appliance stores fell 1.4 percent, while furniture store sales slipped 1.3 percent.

"Those are key signs that consumers are turning away from some big-ticket purchases," Badillo said. "Even though people are building houses and refinancing homes, they're cutting back on furnishing them. So you're seeing signs of weakness."