Stocks closed barely unchanged Tuesday as concerns over higher oil prices dominated investors' minds' while Hurricane Ivan moved through the Gulf of Mexico toward a possible landfall in the United States.

The Dow Jones industrial average (search) was up 3.40 points, or 0.03 percent, at 10,318.16. The Standard & Poor's 500 Index (search) finished up 2.51 points, or 0.22 percent, at 1,128.33. The technology-laced Nasdaq Composite Index (search) gained 5.02 points, or 0.26 percent, at 1,915.40.

Internet stocks, led by Ask Jeeves Inc. (ASK), Amazon.com Inc. (AMZN) and Yahoo Inc. (YHOO), rose on indications that third-quarter results might hit the high end of targets and on a surprise boost in August online retail sales.

With Hurricane Ivan threatening oil rigs in the Gulf of Mexico, crude futures moved higher for the second straight day, renewing investors' fears of a further drop-off in consumer spending due to higher gasoline prices.

Oil companies plucked thousands of workers from offshore rigs in the gulf, home of about a quarter of U.S. oil and gas output, and shut down some production.

A barrel of light crude settled at $44.40, up 53 cents, on the New York Mercantile Exchange (search). Crude futures were just $5 from the record high $49.40 struck on Aug. 20.

"The big talk today has obviously been Ivan, and what industries are going to be affected -- insurance, commerce, oil, whatever," said Brian Williamson, vice president of equity trading at The Boston Co. Asset Management.

"Is it going to be distribution centers in Houston, or oil rigs in the gulf or direct hits in Louisiana where there's a lot of commerce?"

However, Saudi Oil Minister Ali al-Naimi offered some reassurance when he said on Tuesday that Saudi Arabia would maintain a higher rate of 9.5 million barrels a day in October. The Organization of the Petroleum Exporting Countries (search), which meets in Vienna on Wednesday to review policy, is keeping its foot to the pedal on oil production in a bid to push crude prices back below $40 a barrel.

Sluggish automotive sales resulted in a 0.3 percent drop in retail sales for August, worse than the 0.1 percent economists had expected, leading to renewed concerns that consumers — a key part of the nation's economic engine — continued to watch their spending carefully.

"Retail sales still show that the economy is not quite hitting on all cylinders just yet," said Phil Flynn, senior market analyst at Alaron Trading Corp.

"It's no mystery that consumers are spending more on energy and fuel costs, and that's started to filter down," said Scott Wren, equity strategist for A.G. Edwards & Sons. "What this boils down to is we need something that's going to encourage consumers and help drive spending. We need to see better job growth and a better overall economy."

Meanwhile, the U.S. current account gap widened again in the second quarter, growing to a record $166.18 billion, the Commerce Department (search) said on Tuesday.

While the overall retail sales report was disappointing, defusing the positive momentum from July's 0.8 percent increase, there was a little good news. Without including auto sales, retail sales rose 0.2 percent for the month, in line with Wall Street's expectations.

However, with consumers unwilling to spend on big-ticket items like cars, Wall Street was concerned that they remained nervous about the economy and may cut their spending further.

The retail report was the latest in a string of disappointing news for the nation's automakers, which have already cut back production on 2005 models due to soft demand. Ford Motor Co. (F) 12 cents to $13.98, while General Motors Corp. (GM) fell 35 cents to $42.65, and DaimlerChrysler AG edged 2 cents higher to $43.53.

Many retailers are already adjusting their outlooks to reflect lower consumer spending. Office Depot Inc. (ODP) said it expects its third-quarter earnings to fall below Wall Street estimates, and lowered its full-year outlook due to slumping sales. Office Depot tumbled $1.10 to $15.10.

Meanwhile, Oracle (ORCL) closed 7 cents higher to $10.55 prior to its latest quarterly earnings report. After the session, the company reported earnings of 10 cents per share, a penny better than Wall Street expectations. Oracle rose 37 cents to $10.92 in after-hours trading.

The company was buoyed by a federal judge's decision last Thursday allowing Oracle to move forward with its $7.7 billion hostile takeover bid for PeopleSoft.

Supermarket chain Kroger Co. (KR) was down 72 cents at $15.98 after reporting a 25 percent drop in earnings for the second quarter, blaming the falloff on higher debt payments and a grocery workers strike. The company missed Wall Street expectations by 8 cents per share.

Home decor chain Pier 1 Imports Inc. (PIR) saw its sales fall in the latest quarter, sending its earnings 43.3 percent lower from a year ago. While Pier 1 beat analysts' forecasts by a penny, the company lowered its 2004 outlook. Pier 1 nonetheless gained $1.06 to $18.90.

The Russell 2000 index of smaller companies was down 2.14, or 0.4 percent, at 570.96.

Overseas, Japan's Nikkei stock average rose 0.4 percent. In Europe, Britain's FTSE 100 closed down 0.3 percent, France's CAC-40 dropped 0.5 percent for the session and Germany's DAX index slipped 0.1 percent.

Reuters and the Associated Press contributed to this report.