Crude oil prices touched $100 Tuesday as a weak dollar and bullish price forecasts from several investment banks spurred investment interest in commodities.

Light, sweet crude for July delivery gained $1.89, or 1.9%, to settle at $99.59 a barrel on the New York Mercantile Exchange. The benchmark contract had touched a high of $100.09 earlier in the day. Brent crude for July delivery on the ICE futures exchange was recently up $2.25, or 2%, at $112.35 a barrel.

The dollar slipped against the euro after upbeat data on German business confidence boosted the European currency. Crude oil futures recouped some of their recent losses as the dollar slumped. A weaker dollar raises the appeal of dollar-denominated commodities as they seem cheaper for holders of other currencies.

The ICE Dollar Index, which tracks the dollar against a basket of currencies, recently fell 0.4% to 75.871.

"As the day wore on we didn't see the dollar rally back up, it only weakened so it gave traders the confidence to come back and buy some of what they recently sold," said Peter Donovan, a Nymex floor trader with Vantage Trading.

Oil analysts at Goldman Sachs raised their price forecasts on Brent crude Tuesday, saying global economic growth will continue to pressure spare capacity among major oil producers.

The loss of production in Libya due to the civil war will "tighten the oil market to critically tight levels in early 2012," the analysts added. They raised their three-month forecast on Brent crude to $115 a barrel, their six-month forecast to $120 a barrel and their 12-month forecast to $130 a barrel.

"Although the growth environment is clearly slower than the one before the unrest began and downside risks remain in the near-term, we expect oil prices to move substantially higher over the next 18 months," the analysts wrote in a report to clients.

Forecasts from Goldman's analysts are closely watched in the oil world, and traders and hedgers often follow the bank's recommendations. The analysts said the recent pullback in prices offer a "good opportunity" for oil consumers to begin to hedge their forward exposure.

Morgan Stanley, another prominent voice, also raised its forecast on Brent crude late Monday. The bank lifted its 2011 Brent forecast to $120 a barrel from $110. It raised its 2012 forecast to $130 a barrel from $105.

"Oil fundamentals have improved markedly over the past year owing largely to an improvement in demand, and more recently on lost production," Morgan Stanley's oil analysts wrote.

Market participants also turned their sights on U.S. crude oil inventories, with the American Petroleum Institute due to release its survey of U.S. crude stockpiles at 4:30 p.m. EDT. The Department of Energy will release its more closely followed report Wednesday at 10:30 a.m.

U.S. stockpiles are expected to fall by 1.2 million barrels, according to a survey of analysts by Dow Jones Newswires. Gasoline inventories are predicted to fall 100,000 barrels, while inventories of distillates, including heating oil and diesel, are expected to remain unchanged.

"There are inventory expectations out there for draws in crude and a slight build in gasoline, so short-term traders may have been covering their positions," Donovan said, adding that investors who used trading strategies that profit from lower prices may have cancelled out their positions by purchasing futures contracts in the afternoon.

Front-month June reformulated gasoline blendstock, or RBOB, settled up 5.47 cents, or 1.9%, at $2.9928 a gallon. June heating oil added 6.26 cents, or 2.25%, at $2.9097 a gallon.