Crude oil crept above $96 a barrel as Hurricane Isaac picked up speed in the Gulf of Mexico, where roughly one-quarter of the country's oil is produced. Much of the region's production and refining activity has shut down.
The Standard & Poor's 500 index slipped 1.14 points to 1,409.30, and the Nasdaq composite index gained 3.95 points to 3,077.14.
Trading was light again, typical for August vacation season.
The indexes dipped in morning trading after the Conference Board said its consumer confidence index fell to its lowest point since November 2011. Economists had expected a much higher reading. The index was 60.6, down from 65.4 in July.
For economists and investors, the big event this week is Fed Chairman Ben Bernanke's speech at an annual conference in Jackson Hole, Wyo. Traders will sift through his speech Friday for evidence the Fed is readying more steps to spur economic growth.
Worries over Europe resurfaced following news that one of Spain's largest regions, Catalonia, said it will ask the central government for $6.3 billion in rescue aid. Catalonia would be the third Spanish region to ask for help.
Borrowing costs for Spain and Italy jumped, and major stock indexes in Europe closed lower. Germany's DAX dropped 0.6 percent, while France's CAC 40 fell 0.9 percent.
Among stocks that made big moves:
Lexmark International jumped 14 percent, the biggest gain in the S&P. Lexmark said that it will stop making ink-jet printers and plans to lay off 1,700 employees, nearly 13 percent of its work force. The company expects to shutter its ink-jet supply plant in the Philippines by the end of 2015. Lexmark's stock gained $2.61 to $21.62.
The world's top ketchup maker, H.J. Heinz, gained 2 percent. The company's CEO said strong sales in Brazil, Indonesia and other developing countries should help quarterly earnings beat Wall Street's expectations. The Pittsburgh company will report results Wednesday. Its stock rose 95 cents to $57.41.
Sanderson Farms soared 9 percent after the poultry company swung to a quarterly profit. Higher prices for chicken parts, from boneless breasts to jumbo wings, pushed both profits and revenue above analysts' estimates. Sanderson Farms' stock surged $3.46 to $44.05.