Oil rose to a six-month high on Tuesday on optimism an economic recovery may prompt rising fuel demand and on buying to hedge against a weaker U.S. dollar.

U.S. crude settled up 35 cents to $58.85 a barrel after earlier reaching $60.08, its highest level since November. Oil trimmed earlier gains after the U.S. Department of Energy (DOE) slashed its 2009 oil demand forecast.

London Brent crude rose 46 cents, to $57.94 a barrel.

There are institutional investors getting in, pushing up prices, said Jim Ritterbusch, president of Ritterbusch & Associates in Galena, Illinois. The dollar is a little weak and that's also supportive for crude futures.

The U.S. dollar fell to a four-month low against a basket of world currencies as investors with higher appetite for risk sold dollars, often considered a safe haven.

Oil futures are priced in dollars and often rise if the U.S. currency weakens.

U.S. Memorial Day holiday travel is likely to rise by 1.5 percent this year from 2008, travel and auto group AAA said on Tuesday. Motorists will drive more this year during the three-day weekend, which ends May 25, AAA forecast.

Oil prices briefly dipped into negative territory after the EIA released its monthly forecast for May, which revised down a 2009 forecast for global demand by 420,000 barrels per day (bpd) from last month's report.

The EIA revision shows that the demand outlook has worsened substantially in less than a month, said Tim Evans, energy analyst at Citi Futures Perspective in New York.

But as you can see, oil futures are not falling too much as there are people who are trying to ignore fundamental data, screening out bearish news, and are buying on the dips.

Oil has dropped from record highs of more than $147 a barrel struck in July 2008, as the economic crisis hits demand. But a recent rally in equities has helped lift oil prices from below $34 a barrel in February.

The Dow Jones industrial average <.DJI> rose 1 percent to 8,502 points in afternoon trade, reversing an earlier stock market dip. The S&P 500 <.SPX> rose 0.4 percent. <.N>

U.S. oil inventory data due from the American Petroleum Institute late Tuesday and EIA data to be released on Wednesday is forecast to show a further rise in crude oil stocks, currently at 19-year highs.

U.S. crude stockpiles probably rose for the 10th straight time last week, up by 1.4 million barrels, according to a Reuters poll. Distillate stocks are likely to have risen by 1.3 million and gasoline stocks by 100,000 barrels, a preliminary Reuters poll showed.

(Additional reporting by Gene Ramos, Robert Gibbons, Rebekah Kebede and Matthew Robinson in New York, Jane Merriman in London and Chua Baizhen in Singapore; Editing by Christian Wiessner)