Oil futures briefly touched $100 a barrel Tuesday before quickly backing off, as traders remain hesitant to lay big positions without a deal on the U.S. debt ceiling.

Light, sweet crude for September delivery settled up 39 cents, or 0.4%, to $99.59 a barrel on the New York Mercantile Exchange. Brent crude on the ICE futures exchange settled up 34 cents, or 0.3% to $118.28 a barrel.

Nymex crude futures briefly shot as high as $100.62 a barrel, their highest since June 15, before quickly pulling back to settle slightly higher on the day. The intraday rally was spurred by a weaker dollar, which fell as lawmakers remained deadlocked over a deal to raise the U.S. debt limit.

Oil traders are wary of making major trades without a deal. Any failure to reach an agreement before Aug. 2, when the Treasury Department says the government will run out of cash, is likely to trigger a sell-off of risky assets like commodities, analysts have said. News of an agreement, however, could prompt a rally back above $100 a barrel.

In the mean time, trading volumes have remained thin and many market participants have remained on the sidelines.

"We're waiting on the debt deal," said Carl Larry, director of energy derivatives and research at Blue Ocean Brokerage in New York. "That'll be the first hump we need to get over to see trading volumes pick up again."

President Barack Obama warned on Monday that failure to raise the debt ceiling in time risks sparking "a deep economic crisis." The three main ratings agencies have said they would cut the U.S.'s triple-A credit rating if the U.S. defaults. Standard & Poor's has said it could do so even before Aug. 2.

A downgrade could raise the cost of borrowing for businesses and households and could derail the already-fragile economic recovery in the world's largest oil consumer.

Still, the long-term impact of a default on crude prices remains unclear. Analysts have said that a default is likely to erode the U.S. dollar, which typically buoys oil prices by making the commodity more expensive for holders of other currencies. But the impact of a weaker greenback could easily be outweighed if a default meaningfully damages the economic recovery and chips away at oil demand.

"Any firm headline of a U.S. debt extension, we should expect to see an attack of the $100 a barrel," said Olivier Jakob, head of the Swiss consultancy PetroMatrix, in a research report.

Market participants could take trading cues later Tuesday from the American Petroleum Institute's survey of U.S. inventory levels, due at 4:30 p.m. EDT. The Department of Energy is due to release its more closely watched report Wednesday at 10:30 a.m. EDT.

Analysts expect oil stockpiles last week fell 1.4 million barrels, according to a survey by Dow Jones Newswires. Gasoline stocks are seen rising 400,000 barrels, while inventories of distillates, including heating oil and diesel, are expected to climb 1.7 million barrels.

Front-month August reformulated gasoline blendstock, or RBOB, settled up 2.72 cents, or 0.9%, to $3.1536 a gallon. August heating oil settled up 0.56 cent, or 0.2%, to $3.1134 a gallon.