Oil hit an all-time high above $97 per barrel on fears of a supply crunch ahead, while lingering credit fears pushed the dollar down to a record low against the euro.
U.S. stocks advanced, led by shares of energy giants such as Exxon Mobile Corp, and Treasury prices slipped, though concern about more credit losses at financial firms continued to lend some safe-haven support.
In the oil market, U.S. crude settled up $2.72 at $96.70 a barrel after hitting an all-time high of $97.10. A weaker dollar and U.S. government warnings about a winter supply squeeze in consumer nations helped push prices higher.
Rising oil consumption and the realization that additional OPEC production may not be sufficient to arrest the inventory decline are keeping markets firm, the Energy Information Administration said in its monthly short-term energy outlook.
On Wall Street, energy giant Exxon Mobil led the way higher, gaining 3.1 percent to $90.38.
The Dow Jones industrial average jumped 117.54 points, or 0.87 percent, to end at 13,660.94. The Standard & Poor's 500 Index was up 18.10 points, or 1.20 percent, to finish unofficially at 1,520.27. The Nasdaq Composite Index was up 30.00 points, or 1.07 percent, to close unofficially at 2,825.18.
The FTSEurofirst 300 index gained 0.3 percent, helped by gains in mining shares, but financials were again weaker as investors treated the sector with suspicion following Citigroup's warning on Monday that it may write off $11 billion in subprime mortgage losses on top of a $6.5 billion write-down last quarter.
Some analysts said high energy costs and lingering concern about more loan losses on Wall Street were keeping traders cautious.
If people start noticing going into the Christmas season they're going to have to spend more at the pump, it might not be a good thing, said Tom Schrader, managing director of U.S. equity trading at Stifel Nicolaus Capital Markets in Baltimore, Maryland.
I think you're going to continue to see weakness in the financials until we get a sense the subprime and loan debacle at all of these money-center banks and brokerage firms has run its course, Schrader said.
Those worries weighed on the dollar, which fell to $1.4571 per euro, according to Reuters data, the lowest level since the euro was launched in 1999. It last traded at $1.4554, up 0.7 percent on the day.
The dollar index, which tracks the greenback's performance against a basket of six major currencies, dipped to 75.986, the lowest in its more than 30-year history.
Throughout the banking system there is a real belief that a lot of U.S. banks haven't come clean yet on what their exposures are to this subprime fallout and, as a result, the view is that the Fed will have to cut rates again at the December meeting, said Greg Salvaggio, senior currency trader at Tempus Consulting in Washington.
Interest rate markets see a more than 60 percent chance of another Federal Reserve interest rate cut in December. The Fed cut rates by a half point in September and another quarter point last week, leaving them at 4.5 percent.
Gold rose $16.80, or 2.08 percent, to $822.90, its highest level in 28 years, drawing support from strong oil prices, a weak dollar and general safe-haven buying.
In the U.S. Treasury market, the benchmark 10-year note was down 10/32 in price for a yield of 4.37 percent. The 2-year note fell down 2/32, with the yield at 3.70 percent.
(Additional reporting by Lucia Mutikani, Ellis Mnyandu, Robert Gibbons, and John Parry)