Light, sweet crude for October delivery was up $2.88 to $119.15 a barrel on the New York Mercantile Exchange. The contract rose $1.16 overnight to settle at $116.27 a barrel.
In London, October Brent crude rose $2.30 to $116.93 a barrel on the ICE Futures exchange.
"It's obviously been a factor playing on the minds of oil markets at the moment," said David Moore, commodity strategist at Commonwealth Bank of Australia in Sydney. "There's a potential impact on production in the Gulf of Mexico area."
Gustav roared ashore on Haiti Tuesday near the city of Jacmel as a hurricane with top sustained winds near 90 mph. The National Hurricane Center said the storm's winds dropped from hurricane-strength to 60 mph Wednesday. The storm was centered about 90 miles west of Port-au-Prince. But the storm is expected to get stronger later this week and continue moving toward the west-northwest.
Gustav could regain hurricane strength soon and forecasts suggested it could head toward the U.S. Gulf Coast as a dangerous Category 3 hurricane next week, the NHC said.
A powerful storm in the Gulf could force shutdowns on the offshore rigs that account for about a quarter of U.S. crude production and much of its natural gas. Royal Dutch Shell PLC said it could begin evacuating workers as soon as Wednesday.
Losses by the U.S. dollar against other major currencies also helped boost oil prices.
Investors tend to buy into commodities like oil as a hedge against inflation and weakness in the U.S. currency.
The euro recovered ground against the dollar Wednesday after hitting a six-month low the previous day. It bought $1.4726 in European trading, up from $1.4650 in New York late Tuesday and above the $1.4569 it bought earlier in Tuesday's session.
The dollar also gave up ground against the Japanese currency, declining to 109.52 Japanese yen from 109.63 yen in the previous session.
Still, evidence of falling U.S. oil demand is keeping a lid on prices. The U.S. Energy Department's Energy Information Administration said Tuesday that year-over-year oil demand was down 5.6 percent in June.
"We're getting some pretty powerful data that suggests slower growth and higher gasoline prices have really crimped oil demand in the U.S," Moore said.
Investors were waiting for an EIA report on U.S. oil stocks for the week ended Aug. 21 later in the day. The petroleum supply report was expected to show that gasoline inventories fell by 2.8 million barrels, according to the average of analysts' estimates in a survey by energy information provider Platts.
The Platts survey also showed that analysts projected oil stocks rose 1.5 million barrels and distillates went up 900,000 million barrels during last week.
In other Nymex trading, heating oil futures rose 8 cents to $3.293 a gallon, while gasoline prices gained 7.3 cents to $3.4027 a gallon. Natural gas futures increased 40 cents to $8.678 per 1,000 cubic feet.
Associated Press writers Alex Kennedy in Singapore and Jonathan M. Katz in Port-au-Prince, Haiti, contributed to this report.